I've got XAMPP up and running very nicely on my Kubuntu machine, which I'm using to develop websites. I have several sites that I can access through the browser, but I also need to access them on windows computers connected to my local area network. As an example, I have two sites- http://school1.local, and http://lawoffice.local.
I've been googling all over the place and I've tried several configurations, but nothing seems to work:
My httpd-vhosts.conf looks like this on my Kubuntu machine
- Code: Select all
NameVirtualHost 127.0.0.1
NameVirtualHost school1.local
NameVirtualHost lawoffice.local
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot /opt/lampp/htdocs
</VirtualHost>
<VirtualHost school1.local>
DocumentRoot /home/me/weblab/school1
ServerName school1.local
ServerAlias *.school1.local
<Directory /home/me/weblab/school1>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost lawoffice.local>
DocumentRoot /home/me/weblab/lawoffice
ServerName lawoffice.local
ServerAlias *.lawoffice.local
<Directory /home/me/weblab/lawoffice>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
... and my /etc/hosts file looks like this
- Code: Select all
127.0.0.1 localhost
127.0.0.1 school1.local
127.0.0.1 lawoffice.local
Now, on the windows computer, I've set the C:\WINDOWS\system32\drivers\etc\hosts. (my Kubuntu machine has a local IP address of 192.168.1.101.)
- Code: Select all
127.0.0.1 localhost
192.168.1.101 school1.local
192.168.1.101 lawoffice.local
On my Kubuntu machine I can view any website I call up, but trying to browse the sites on the windows machine simply brings up the xampp start page. I need this to work so that I can test sites on different browsers without uploading to the ISP.
Any help will be greatly appreciated!
Alan