Reputation: 1154
I have added a virtual host container in my httpd.conf file.
<VirtualHost *:80>
DocumentRoot /var/www/dev_sites/site
ServerName site.aa.local
</VirtualHost>
In my /etc/hosts file on my server computer it is:
127.0.0.1 site.aa.local
If I go to site.aa.local on my machine I can see my site. However if I go to that same address on another computer on my network it doesn't find the page. However, if I do aa.local it finds that. Any idea why a computer on my network can't see it?
I'm on a centos machine.
Upvotes: 0
Views: 1590
Reputation: 11862
site.aa.local
points to your loopback interface in your machine. Just in case: it's a virtual interface that is only accessible from your machine by definition.
For that name to work in another computer, site.aa.local
should point to your machine's LAN IP address (either via /etc/hosts or DNS) and the Apache server in your computer should be listening in all interfaces (it most likely is).
Try adding YOUR_LAN_IP site.aa.local
to the /etc/hosts
file in the other computer, or just visit YOUR_LAN_IP if that is the Apache default virtual host (that is, if it's the only one or the first defined).
Upvotes: 2