I setup LAMPP and virtual hosts on my Ubuntu 14.04 with lan ip 192.168.0.106. I set up two websites with directories /srv/www/d6/public_html and /srv/www/d7/public_html. here is the contents of /etc/apache2/sites-available/d6.com.conf. The d7 .com.conf is similar just edited for d7. # domain: example.com # public: /srv/www/d6/public_html/ <VirtualHost 192.168.0.106> # Admin email, Server Name (domain name), and any aliases ServerAdmin ServerName d6.local ServerAlias d6 # Index file and Document Root (where the public files are located) DirectoryIndex index.html index.php DocumentRoot /srv/www/d6/public_html/ # Log file locations LogLevel warn ErrorLog /srv/www/d6/log/error.log CustomLog /srv/www/d6/log/access.log combined </VirtualHost> when I access from the local machine both websites on d6 and d7 load fine. when i access via my win7 PC on the same lan nothing loads then it times out. But when I enter 192.168.0.106 I get the site on d6 quickly and normally. here is my ubuntu etc/hosts file: 127.0.0.1 localhost 127.0.0.1 d6.local 127.0.0.1 d7.local 192.168.0.106 d6.local 192.168.0.106 d7.local I placed these on my win7 host file: 192.168.1.106 d6.local 192.168.1.106 d7.local when I ping either i get: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\whut>ping d7.local Pinging d7.local [192.168.1.106] with 32 bytes of data: Request timed out. Request timed out. Request timed out. why does it time out? any hints appreciated tia.
It's not the DNS - as you can see from the ping, it finds the correct IP-address for pinging, but it doesn't get access - which leads me to believe there is a problem either on the router or on the computer acting as a server. Maybe you have firewall-settings that prevent access?
thanks to my eagle eyed friend it's fixed. the correct IP address is 192.168.0.106 the ip address i placed in the win host file is 192.168.1.106 works ok now.