yhuynh Posted May 19, 2009 Report Share Posted May 19, 2009 I have set up my virtual hosts like so: NameVirtualHost * <VirtualHost *> ServerName localhost:80 DocumentRoot /www</VirtualHost> <VirtualHost *> ServerName yemmer DocumentRoot /www/yemmer</VirtualHost> However, what i notice is that if i go to: http://yemmer 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: 127.0.0.1 localhost127.0.0.1 localhost:80 127.0.0.1 yemmer which looks right. Quote Link to comment Share on other sites More sharing options...
markettwp Posted May 20, 2009 Report Share Posted May 20, 2009 yhuynh, 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 example127.0.0.1 localhost127.0.0.1 localhost:80127.0.0.1 GadgetsforGold.Com127.0.0.1 StopBrite.com#127.0.0.1 TWPMarket.ing127.0.0.1 TWPMarketing.com127.0.0.1 UGM.com127.0.0.1 cimyadmin.ing HTTPD.CONF example#<VirtualHost *># ServerName localhost:80# DocumentRoot /www#</VirtualHost> ##########VIRTUAL HOST SETUP########### GADGETSFORGOLD<VirtualHost *>ServerName GadgetsForGold.comDocumentRoot /www/gfg</VirtualHost># TWPMARKET.ING<VirtualHost *>ServerName TWPMarket.ingDocumentRoot /www/twping</VirtualHost># TWP MARKETING<VirtualHost *>ServerName TWPMarketing.comDocumentRoot /www/twp</VirtualHost># STOPBRITE<VirtualHost *>ServerName Stopbrite.comDocumentRoot /www/sb</VirtualHost># UG_Maint<VirtualHost *>ServerName UGM.comDocumentRoot /www/ugm</VirtualHost><VirtualHost *>ServerName cimyadmin.ingDocumentRoot /www/CIMyAdmin</VirtualHost>Hope this helpsTWP Quote UniformServer 5.x, CodeIgniter, Gimp. What else could anyone want? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.