severndigital Posted October 10, 2008 Share Posted October 10, 2008 Ok so i have a server running Apache 2.2.3 (server 1) and another running 2.2.8 (server 2) server 1 I have working virtual hosts running on this server and working just fine. Here they are <VirtualHost *:80> ServerName joblist.pacex.com DocumentRoot "/home/pacexvp/joblist" <Directory "/home/pacexvp/joblist"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName timeclock.pacex.com DocumentRoot "/home/pacexvp/timeclock" <Directory "/home/pacexvp/timeclock"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName orders.pacex.com DocumentRoot "/home/pacexvp/orders" <Directory "/home/pacexvp/orders"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName admin.pacex.com DocumentRoot /home/pacexvp/admin <Directory "/home/pacexvp/admin"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName purls.pacex.com DocumentRoot "/home/purls" <Directory "/home/purls"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName pacesetter.homeip.net DocumentRoot /home/pacexvp/orders <Directory "/home/orders"> allow from all Options +Indexes </Directory> </VirtualHost> Nothing fancy just a couple of things and then I set up my host file on my computer to look like the following 192.168.0.25 orders.pacex.com 192.168.0.25 admin.pacex.com and so on. All of those entries work just fine. now on server 2 (2.2. I copied and pasted the working virtual hosts from server 1 and they look like this. <VirtualHost *:80> ServerName area51.com DocumentRoot /var/www/html/TestingServer <Directory "/var/www/html/TestingServer"> allow from all Options +Indexes </Directory> </VirtualHost> <VirtualHost *:80> ServerName area52.com DocumentRoot /var/www/html/phpMyadmin <Directory "/var/www/html/phpMyadmin"> allow from all Options +Indexes </Directory> </VirtualHost> I also configured my hosts file to the following 192.168.0.8 area51.com 192.168.0.8 area52.com restart apache and NO DICE ... if i type in area51.com i get the correct location. if i type in area52.com i get the area51.com root directory. can anyone help out??I've been trying to get this to work for 2 days now. Thanks, -C Quote Link to comment Share on other sites More sharing options...
corbin Posted October 12, 2008 Share Posted October 12, 2008 Do you have NameBasedVirtualHost or what ever the flag is in the second server's file? Quote Link to comment Share on other sites More sharing options...
severndigital Posted October 14, 2008 Author Share Posted October 14, 2008 Thanks, that seems to have done the trick. I don't remember un-commenting that line in the other server. anyways ..here was the line that caused the problem #NameVirtualHost *:80 just took out the # and it works perfect. Thanks, -C 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.