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.
site.aa.localpoints 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.localshould 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.localto the/etc/hostsfile 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).