Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Pings to my domain name work, but I can't connect via http. I've been trying various methods for a week now, but haven't come up with anything that worked. Any idea what's causing this?


ServerName machinename.local

<VirtualHost *:80>
  DocumentRoot "/Users/myusername/appname/public"
  <Directory "/Users/myusername/appname/public">
    AllowOverride all 
    Options -MultiViews


I can access the app from my local machine, but not on any other. I've set up dynamic DNS.


share|improve this question
Do you have a firewall running? – AliGibbs Apr 4 '12 at 16:32
Thought that might be the problem, so I shut it off while testing—still no luck. – airlok Apr 4 '12 at 16:33
What happens when you connect to and Apache is running, right? – Kyle Smith Apr 4 '12 at 16:38
Apache is running: httpd (pid 50205) already running. I get my Rails app when running this from my local computer, but it times out when I try to access it from any other. – airlok Apr 4 '12 at 16:40
Have you tried accessing the site from another computer on the same network? You may be having trouble because of NAT at your network edge. – becomingwisest Apr 4 '12 at 17:23
up vote 3 down vote accepted

Placing an entry in your /etc/hosts will not cause other hosts in your network to know your computer as '', even with dynamic DNS. Dynamic DNS typically associates your local hostname with a DNS name inside of your DNS servers zonefile. That's likely not ''. You would need to either add '' to the /etc/hosts of the systems you are trying to connect from, or to a DNS server that is authoritative for that zone.

share|improve this answer
I have added it to a DNS server. When I ping, I get responses back from my computer's public IP—the DNS is working fine. – airlok Apr 4 '12 at 16:57
When you say public IP, do you mean the Internet side of your WAN device, or your LAN IP (like 192.168.x.y, 10.x.y.z, etc.)? – Kyle Smith Apr 4 '12 at 19:10
The internet side, not LAN (ie. 10.x.y.z) – airlok Apr 4 '12 at 20:13
It looks like your domain (on the Internet side) is pointing to Are you expecting that I should be able to reach the site from here? If so, what sort of device (firewalls, routers, etc.) connects your computers to your BelAir Internet connection? – Kyle Smith Apr 4 '12 at 20:18
Yes, I'd hoped that the IP address would be accessible. How I connect to the internet is a bit of a black-box for me, since I'm on an apartment-wide internet connection. – airlok Apr 4 '12 at 20:26

I had the same issue a few days again with 2 websites I was trying to access from my webserver. The fix was adding alias and restarting apache. here's my vhost entry in httpd.conf ; hope this helps

<VirtualHost *:80>
   ServerAlias *
   DocumentRoot /var/www/html

Also make sure that the following is uncommented

# Use name-based virtual hosting.

NameVirtualHost *:80

share|improve this answer
Did you mean ""? – Kyle Smith Apr 4 '12 at 16:48
Obvious mistake... – gparent Apr 4 '12 at 16:50
sorry about that typo, fixed :) – RomeNYRR Apr 4 '12 at 16:58
Gave this a shot, still no luck. – airlok Apr 4 '12 at 20:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.