Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

/etc/apache2/httpd.conf

ServerName machinename.local

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

/etc/hosts

127.0.0.1 chipperapp.com

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

Thanks!

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 127.0.0.1:80 and chipperapp.com:80? 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

2 Answers 2

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 'chipperapp.com', 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 'chipperapp.com'. You would need to either add 'chipperapp.com' 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 chipperapp.com, 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 68.170.77.58. 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>
   ServerAdmin server@server.com
   ServerName www.yourapp.com
   ServerAlias *.yourapp.com
   DocumentRoot /var/www/html
</VirtualHost>

Also make sure that the following is uncommented

# Use name-based virtual hosting.

NameVirtualHost *:80

share|improve this answer
    
Did you mean ".com.com"? –  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

 
discard

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.