simpli Posted June 3, 2009 Share Posted June 3, 2009 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 Quote Link to comment https://forums.phpfreaks.com/topic/160727-solved-something-is-wrong-with-my-virtual-servers/ Share on other sites More sharing options...
roopurt18 Posted June 3, 2009 Share Posted June 3, 2009 Since both names refer to the same IP address, you can not used IP-based virtual hosting. Refer to the details of name-based virtual hosting. http://httpd.apache.org/docs/2.0/vhosts/name-based.html Quote Link to comment https://forums.phpfreaks.com/topic/160727-solved-something-is-wrong-with-my-virtual-servers/#findComment-848248 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.