I read a few different articles I found on the web to come up with what I added to my httpd-vhosts.conf file - here is my setup (note that I changed the virtual host site names and commented out some paths for security/privacy reasons):
- Code: Select all
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "C:\Program Files\xampp\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost site1.local>
DocumentRoot "C:\Documents and Settings\*****\My Documents\*****\public_html"
ServerName site1.local
CustomLog "C:\Documents and Settings\*****\My Documents\*****\public_html\site1.local-access_log" combined
ErrorLog "C:\Documents and Settings\*****\My Documents\*****\public_html\site1.local-error_log"
<Directory "C:\Documents and Settings\*****\My Documents\*****\public_html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost site2.local>
DocumentRoot "C:\Documents and Settings\*****\My Documents\*****\public_html"
ServerName site2.local
CustomLog "C:\Documents and Settings\*****\My Documents\*****\public_html\site2.local-access_log" combined
ErrorLog "C:\Documents and Settings\*****\My Documents\*****\public_html\site2.local-error_log"
<Directory "C:\Documents and Settings\*****\My Documents\*****\public_html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This would be what I have in the hosts file of the second computer that I am trying to use to access the virtual site on the computer running XAMPP (once again site name has been edited for security/privacy):
- Code: Select all
127.0.0.1 localhost
192.168.1.140 site2.local
Any ideas why I can't access the virtual site from another computer on the LAN?
Eric