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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.