kalpz Posted September 24, 2006 Report Share Posted September 24, 2006 I have a friend who has a server using UniServer 3.2a.I am trying to help him set up virtual hosts for subdomains. He has a domain www.theundrground.net which points to his server. This is what I have done in his httpd.conf file.. NameVirtualHost * <VirtualHost *> ServerName www.theundrground.net DocumentRoot /www/ </VirtualHost> <VirtualHost *> ServerName test2.theundrground.net DocumentRoot /www/forumz </VirtualHost> <VirtualHost *> ServerName kalpz.theundrground.net DocumentRoot /www/kalpz </VirtualHost> When I restart the server and I go to all 3 domains, it comes up with the same page.. either kalpz page from kalpz folder or the root of /www/. I cant get it to separate. Any ideas? Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
olajideolaolorun Posted September 25, 2006 Report Share Posted September 25, 2006 Search the forum... fixed this before... or try checking the UniCenter: http://center.uniformserver.com/virtual_ho...ual_host_1.html. If nothing, come back. Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
kalpz Posted September 25, 2006 Author Report Share Posted September 25, 2006 Yip, been there done that to no avail.... Im backkkk lol.. Just doesnt wanna work.. Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
olajideolaolorun Posted September 25, 2006 Report Share Posted September 25, 2006 Did you search this forum? Take a look at all the topics relating to virtual host.... Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
kalpz Posted September 25, 2006 Author Report Share Posted September 25, 2006 Yip I have... Should it be using localhost like kalpz.localhost/test.localhost?? If your using domains, then you should use kalpz.theundrground.net right? I have tried every combination.. <VirtualHost *>ServerName kalpz.localhostDocumentRoot /www/kalpz</VirtualHost><VirtualHost *>ServerName kalpz.theundrground.netDocumentRoot /www/kalpz</VirtualHost> the namevirtualhost is uncommented also... Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Ric Posted September 25, 2006 Report Share Posted September 25, 2006 I have had a quick scan of this thread. I cannot see the cause of the problem. Your code is correct: NameVirtualHost * ServerName www.theundrground.netDocumentRoot /www/ ServerName test2.theundrground.netDocumentRoot /www/forumz ServerName kalpz.theundrground.netDocumentRoot /www/kalpz I am puzzled by your test results when typing addresses into a browser: http:// www.theundrground.nethttp:// test2.theundrground.nethttp:// kalpz.theundrground.net You receive a test index page from either folder /www/ or folder /www/kalpz I assume your domain provider has enabled wildcards (CNAME) otherwise you would have received a Server not found error on two of the address. This means that any address containing your domain name *. theundrground.net is reaching your server hence not the problem area. Type any address other than the above three containing your domain name eg fred. theundrground.net Will result in each VirtualHost being checked and of course no match will be found. Apache has no problem with this it will serves pages from the default folder. The default is the first VirtualHost entry hence will server pages from WWW. It appears that only the middle address is not being recognised. That’s what puzzles me and I think it is worth checking to see what is in the hosts file Located in: C:\WINDOWS\system32\drivers\etc\ If you find any entries containing your domain name delete them. For example 127.0.0.1 test2.theundrground.net That’s my best shot for now. Quote Link to comment Share on other sites More sharing options...
kalpz Posted September 28, 2006 Author Report Share Posted September 28, 2006 OK Thanks Ric. I dont know why but I tried it again and now it works... :| So weird.. I did looking in the hosts file.. it said 127.0.0.1 localhost and thats all Thanks for your help anyways... Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Ric Posted September 30, 2006 Report Share Posted September 30, 2006 Glad you got it working yes computers are weird sometimes it is best just to restart the machine because you can be chasing a problem that does not exist. It is the interaction of so many parts that when you change one aspect creates the illusion of a problem. Been down this path may times myself. One final point you state: “I did looking in the hosts file.. it said 127.0.0.1 localhost and thats all” That’s what I would expect. Quote Link to comment Share on other sites More sharing options...
kalpz Posted October 2, 2006 Author Report Share Posted October 2, 2006 Thanks agsin Quote ATOMIC Web Hosting 2007 - 2011 Shared Hosting - Reseller Hosting - Dedicated Servers - Virtual Private Servers (Request Dedicated/VPS Servers via E-mail) E-mail: sales@atomicwebhosting.com Website: http://www.atomicwebhosting.com/ Link to comment Share on other sites More sharing options...
Merrok Posted February 26 Report Share Posted February 26 Have you tried setting up virtual hosts for subdomains? Looks like this could potentially solve your problem. If not, I'd suggest diving into the httpd.conf file and double-checking your configurations. Sometimes a small typo can cause real chaos. Quote 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.