Jump to content

[SOLVED] Something is wrong with my virtual servers


simpli

Recommended Posts

Hi, I tought I had solved my virtual server issue but I guess not. Here's my problem. I have defined two virtual hosts. The second one does not work except when I comment out the first one.

 

In my log I see the following error message, which I have no idea how to deal with:

VirtualHost 127.0.0.1:0 overlaps with VirtualHost 127.0.0.1:0, the first has precedence, perhaps you need a NameVirtualHost directive

 

Here is my virtual hosts information (httpd.conf)

NameVirtualHost *

<VirtualHost 127.0.0.1>
ServerName budgetobjects
DocumentRoot /library/WebServer/Documents/budgetObjects/public
ErrorLog /var/log/budgetobjects/errors.log
CustomLog /var/log/budgetobjects/access.log common
<Directory /library/WebServer/Documents/budgetObjects/public/>
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName zf-tutorial
DocumentRoot /library/WebServer/Documents/zf-tutorial/public
ErrorLog /var/log/zf-tutorial/errors.log
CustomLog /var/log/zf-tutorial/access.log common
<Directory "/library/WebServer/Documents/zf-tutorial/public">
    Options FollowSymLinks
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
</VirtualHost>

 

This is my hosts file

127.0.0.1	localhost
127.0.0.1	budgetobjects
127.0.0.1	zf-tutorial
255.255.255.255	broadcasthost
::1             localhost 
fe80::1%lo0	localhost

 

Can anyone tell me what is wrong with my config so I cannot have two virtual hosts working at same time?

 

Thanks,

JR

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.