Joosttt Posted July 3, 2007 Report Share Posted July 3, 2007 Hi, I just started with Uniform Server and I just love the portability. There is just one little thing I can't get to work. And that is the Virtual host. I used virtual host before on linux so i figured this would be a breeze. But somehow apache only uses the first virtual host entry. To make is easy i'm using 'test' as alias. So my hosts file in c:\windows\system32\driver\etc contains the following line: 127.0.0.1 test on the bottom of my httpd.conf file there is the following: <VirtualHost *> DocumentRoot /www/test ServerName test</VirtualHost> I tryed restarting windows and using fresh installations, but when I paste this peace of code in my httpd.conf file apache directs everything to the test map. So both http://localhost and http://test gets me to /www/test . When i'm using more virtual hosts only the first is used. I'm stuck here and it would be great if anyone could point me in de right direction here. Quote Link to comment Share on other sites More sharing options...
Ric Posted July 4, 2007 Report Share Posted July 4, 2007 Your set-up is working correctly. The address you have supplied http://localhost is not recognised by Apache so cannot be found hence uses the default which is always the first VirtualHost. This page explains it in more detail: http://center.uniformserver.com/virtual_ho...ual_host_1.html All the best Quote Link to comment Share on other sites More sharing options...
Joosttt Posted July 4, 2007 Author Report Share Posted July 4, 2007 But when I add the following to my httpd.conf file: <VirtualHost *> DocumentRoot /www/test ServerName test</VirtualHost> <VirtualHost *> DocumentRoot /www/test2 ServerName test2</VirtualHost> It always goes to the 'test' map. So both http://test and http://test2 point to the /www/test directory. The /www/test2 map does exists and has a very simple index.html file in it. It's like it always uses the default. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted July 4, 2007 Report Share Posted July 4, 2007 Try uncommenting this: NameVirtualHost * Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Joosttt Posted July 4, 2007 Author Report Share Posted July 4, 2007 Try uncommenting this: NameVirtualHost * Whoohoo :angry: It works! Great, now i can start using the uniform server. Thanks! Why is it that uncommenting NameVirtualHost * fixes my problem? Quote Link to comment Share on other sites More sharing options...
olajideolaolorun Posted July 4, 2007 Report Share Posted July 4, 2007 Turns it on...... :angry: Quote Best Regards Olajide Olaolorun The Uniform Server Development Team Link to comment Share on other sites More sharing options...
Joosttt Posted July 4, 2007 Author Report Share Posted July 4, 2007 Hehehe, too obvious 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.