VirtualHost Problem [Sufficiently Resolved]

Problems with the Windows version of XAMPP, questions, comments, and anything related.

VirtualHost Problem [Sufficiently Resolved]

Postby KallistaAEnvarou » 12. May 2008 08:52

I am having a problem with my VirtualHosts.

First, I'll list my code and then explain my issue.

C:\xampp\apache\conf\extra\httpd-vhosts.conf
Code: Select all
<VirtualHost *:80>
ServerName local_reportingscience.com
ServerAlias local_reportingscience.com
ServerAdmin webmaster@local_reportingscience.com
DocumentRoot "C:/xampp/htdocs/reportingscience"
<Directory "C:/xampp/htdocs/reportingscience" >
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/reportingscience/cgi-bin/"
</VirtualHost>

<VirtualHost *:80>
ServerName local_makingalyriaeasy.com
ServerAlias local_makingalyriaeasy.com
ServerAdmin webmaster@local_makingalyriaeasy.com
DocumentRoot "C:/xampp/htdocs/makingalyriaeasy"
<Directory "C:/xampp/htdocs/makingalyriaeasy">
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/makingalyriaeasy/cgi-bin/"
</VirtualHost>


C:\windows\system32\drivers\etc\hosts
Code: Select all
127.0.0.1           localhost
127.0.0.1   local_makingalyriaeasy.com
127.0.0.1   local_phplearningneeds.com
127.0.0.1   local_reportingscience.com


The problem I'm having is that when I start up the server, I get the following warning: "_default_ VirtualHost overlap on port 80, the first has precedence." As well, when I try to go to local_makingalyriaeasy.com, I see files from local_reportingscience.com. How do I fix this problem? I'm running the latest version of xampp (1.6.1 or something)
Last edited by KallistaAEnvarou on 12. May 2008 21:43, edited 1 time in total.
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California

Postby LooseCannon » 12. May 2008 12:19

You've not show the bit of your vhost conf file just above the code you posted, being:

#
# Use name-based virtual hosting.
#
##NameVirtualHost *:80

Have you UNcommented the "NameVirtualHost *.80"? I think you should.

I think you should also UNcomment the section covering ServerName localhost, if you want to access your local XAMPP main web page.
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK

Postby KallistaAEnvarou » 12. May 2008 21:42

Yeah, that worked. Thanks.
KallistaAEnvarou
 
Posts: 126
Joined: 02. December 2007 17:33
Location: Cold Cold California


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 178 guests