Ardinent Posted March 22, 2011 Share Posted March 22, 2011 Hey guys, Very basic question I assume... My apache server is running, can access my HTML/php files in my set up folder via localhost, i.e. //localhost/test.html. If I go to my Sharing tab tab in my System Preferences and de-activate 'Web Server', then go to my terminal and run 'sudo apachectl start' my localhost works again and the System Preferences is updated with the ip address given by my ISP and says 'Your personal website, in the Sites folder in your home folder, is available at' (then adds ~user to the ip address, and 'Your computer's website is available at this address:' and then list the IP address. If I create a html in my set up documents folder that works for the localhost address (/Library/Webserver/Documents/) or in my sites folder (/users/user/Sites/) it doesn't show up in my browser when I run that IP address given in my System Preferences So.... I can access my localhost address but not the one that should be available online.... right? Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/ Share on other sites More sharing options...
Ardinent Posted March 24, 2011 Author Share Posted March 24, 2011 Hey guys, So I've since learnt about DynDNS and subscribed to their service. I've got the DynDNS updater application as well. When I try to access //localhost/index.html it works perfectly, but when I do a Port Scan on 80 (or 8000 when I change Listen to 8000 in my /etc/apache2/httpd.conf) / or try to access my URL as provided by DynDNS, I get a connection time out. The troubleshooter on DynDNS' website give four possible reasons. 1) Port forwarding on router - (I connect with a 3g Modem) 2) Modem Bridge - (I've googled to find out whether my modem needs to be bridged but I've not found any information regarding that yet - I have a HUAWEI K3520) 3) Misconfigured firewall - Currently inactive to try solve this problem 4) Blocked from ISP - I think this to be the most likely situation, but I've contacted my ISP so many times regarding other issues and the customer service consultants are entirely useless. They have absolutely no understanding of the service their company provides. So I would like to know if anyone has some information on modem bridging or maybe whether or not my current modem needs to be bridged and how to go about doing that? Thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/#findComment-1191626 Share on other sites More sharing options...
trq Posted March 24, 2011 Share Posted March 24, 2011 Your outside ip address or domain name will not be available from inside, simply add an entry to your OS's hosts file. On Linux it is within /etc/hosts, Windows, I think its within C:\Windows\System32\Drivers\etc or similar (you'll need to search for it, I'm not a windows user). Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/#findComment-1191642 Share on other sites More sharing options...
Ardinent Posted March 24, 2011 Author Share Posted March 24, 2011 Hi Thorpe, thanks for the reply. This is because of some loopback effect hey? I tried logging in and Port Scanning from two other PC's/IP Addresses as well. I'm a Mac user, will try the hosts thing anyway, but will that make it available to other users that is online? Thank you Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/#findComment-1191651 Share on other sites More sharing options...
Ardinent Posted March 24, 2011 Author Share Posted March 24, 2011 Oh, and how should I enter the domain name? ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost This is what's in there at the moment. Should I add 127.0.0.1 dyndns.url.here ? Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/#findComment-1191655 Share on other sites More sharing options...
trq Posted March 24, 2011 Share Posted March 24, 2011 Adding an entry to your hosts file has no effect on whether or not your server can be seen from the WAN, it simply allows you to use the same domain name (as you would on the WAN) internally. Yes the example you have looks fine, it could be anything you like and you can add more than 1. Quote Link to comment https://forums.phpfreaks.com/topic/231376-apache-server-basics-question/#findComment-1191943 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.