Virtual hosts over LAN
Posted: 02. June 2006 12:11
I'm running XAMPP 1.5.2 on WinXP and have set up some virtual hosts for local Web development. This works fine on my development machine, but I can't access the virtual hosts on another machine (a Mac mini) on my local network.
When using the local IP address of my development machine (http://10.0.0.101/) from the Mac, it redirects to the XAMPP admin pages (http://10.0.0.101/xampp) so Apache is working, but when I try any of the virtual hosts (e.g. http://10.0.0.101/local.site.com), I receive a 404 Object not found error). The Mac can't find my virtual hosts.
I have the following in my httpd-vhosts.conf file:
and this in my hosts file:
I've tried various things like changing the IPs in both files and reconfiguring my router, but to no avail. I just can't figure out why this isn't working properly.
I'd welcome any suggestions as I'm stumped on what's going on. Many thanks in advance.
When using the local IP address of my development machine (http://10.0.0.101/) from the Mac, it redirects to the XAMPP admin pages (http://10.0.0.101/xampp) so Apache is working, but when I try any of the virtual hosts (e.g. http://10.0.0.101/local.site.com), I receive a 404 Object not found error). The Mac can't find my virtual hosts.
I have the following in my httpd-vhosts.conf file:
- Code: Select all
<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot "C:/Program Files/xampp/htdocs"
ServerName localhost
ServerAlias localhost
<Directory "C:/Program Files/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
</Directory>
</VirtualHost>
# local.site.com
<VirtualHost *:80>
ServerAdmin admin@local.site.com
DocumentRoot "C:/web/site"
ServerName local.site.com
ServerAlias local.site.com
<Directory "C:/web/site">
Options Indexes FollowSymLinks
AllowOverride FileInfo
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
and this in my hosts file:
- Code: Select all
127.0.0.1 localhost
10.0.0.101 local.site.com
I've tried various things like changing the IPs in both files and reconfiguring my router, but to no avail. I just can't figure out why this isn't working properly.
I'd welcome any suggestions as I'm stumped on what's going on. Many thanks in advance.