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.
Code:
# domain: example.com # public: /srv/www/d6/public_html/ <VirtualHost 192.168.0.106> # Admin email, Server Name (domain name), and any aliases ServerAdmin someemail@email.com ServerName d6.local ServerAlias www.d6.local # 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 wa ErrorLog /srv/www/d6/log/error.log CustomLog /srv/www/d6/log/access.log combined </VirtualHost>
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:
Code:
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
Code:
192.168.1.106 d6.local 192.168.1.106 d7.local
Code:
Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:Userswhut>ping d7.local Pinging d7.local [192.168.1.106] with 32 bytes of data: Request timed out. Request timed out. Request timed out.
برچسب:
نویسنده: استخدام کار