Jump to content

[SOLVED] Apache 2.2.8 Virtual hosts Problems


severndigital

Recommended Posts

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.8)

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

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.