Page 1 of 1

VirtualHost Problem [Sufficiently Resolved]

PostPosted: 12. May 2008 08:52
by KallistaAEnvarou
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)

PostPosted: 12. May 2008 12:19
by LooseCannon
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.

PostPosted: 12. May 2008 21:42
by KallistaAEnvarou
Yeah, that worked. Thanks.