September 24, 200619 yr comment_3677 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? 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/ Report
September 25, 200619 yr comment_3682 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. Best Regards Olajide Olaolorun The Uniform Server Development Team Report
September 25, 200619 yr Author comment_3686 Yip, been there done that to no avail.... Im backkkk lol.. Just doesnt wanna work.. 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/ Report
September 25, 200619 yr comment_3687 Did you search this forum? Take a look at all the topics relating to virtual host.... Best Regards Olajide Olaolorun The Uniform Server Development Team Report
September 25, 200619 yr Author comment_3689 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... 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/ Report
September 25, 200619 yr comment_3690 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. Report
September 28, 200619 yr Author comment_3698 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... 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/ Report
September 30, 200619 yr comment_3719 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. Report
October 2, 200619 yr Author comment_3732 Thanks agsin 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/ Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.