Jump to content
The Uniform Server Community

Virtual hosts keep going to root


Recommended Posts

I have set up my virtual hosts like so:


NameVirtualHost *


<VirtualHost *>

ServerName localhost:80

DocumentRoot /www



<VirtualHost *>

ServerName yemmer

DocumentRoot /www/yemmer



However, what i notice is that if i go to:




it takes me to /www and not /www/yemmer


I have searched through the forums here and haven't found articles related to this problem. Does anyone know what is causing this?


I'm on Windows XP.


Also my C:/WINDOWS/system32/drivers/etc/hosts file has this: localhost localhost:80 yemmer


which looks right.

Link to comment
Share on other sites



Your configuration is the same as mine (XP, hosts, httpd.conf) except that I have used a fake domain name (ie.; yemmer.com ) in hosts and the httpd.conf files. I don't see where this would make any difference, but I note it.


I also see you have localhost:80 UNCOMMENTED as a virtual host in httpd.conf THIS MAY BE THE PROBLEM... I have it commented out in my httpd.conf (see below)


Do you have a valid html file in the root? index.php, .html etc?


Localhost is the default choice in httpd.conf and so it will be presented when apache cannot find the specified domain. That's why localhost:80 is first in the list in httpd.conf.


I do NOT have localhost (without the port 80) specified in httpd.conf. Look around line 278 for "servername localhost:80". Here's my configuration for comparison, all of which is working:


HOSTS example localhost localhost:80 GadgetsforGold.Com StopBrite.com

# TWPMarket.ing TWPMarketing.com UGM.com cimyadmin.ing


HTTPD.CONF example

#<VirtualHost *>

# ServerName localhost:80

# DocumentRoot /www



##########VIRTUAL HOST SETUP##########


<VirtualHost *>

ServerName GadgetsForGold.com

DocumentRoot /www/gfg



<VirtualHost *>

ServerName TWPMarket.ing

DocumentRoot /www/twping



<VirtualHost *>

ServerName TWPMarketing.com

DocumentRoot /www/twp



<VirtualHost *>

ServerName Stopbrite.com

DocumentRoot /www/sb


# UG_Maint

<VirtualHost *>

ServerName UGM.com

DocumentRoot /www/ugm


<VirtualHost *>

ServerName cimyadmin.ing

DocumentRoot /www/CIMyAdmin


Hope this helps


UniformServer 5.x, CodeIgniter, Gimp. What else could anyone want?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...