HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Apache vhost problem! (http://www.howtoforge.com/forums/showthread.php?t=9700)

gral 10th January 2007 16:28

Apache vhost problem!
 
Hi everyone, im having troubles with the virtualhost, when i restart the apache i received:

Stopping httpd: [ OK ]
Starting httpd: [Wed Jan 10 18:08:03 2007] [warn] VirtualHost xxx.xxx.xxx.xxx:80 overlaps with VirtualHost xxxx.xxx.xxxx.xxx:80, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Jan 10 18:08:03 2007] [warn] VirtualHost xxx.xxx.xx.xx.:80 overlaps with VirtualHost 209.85.106.202:80, the first has precedence, perhaps you need a NameVirtualHost directive
[ OK ]

The problem is when a try to enter via Web to any the virtualhost allways i see the the apache Delfault Page!!

my /etc/httpd/conf/httpd.conf is:

<VirtualHost xxx.xxx.xxx.xx:80>
Servername example.maindomain.net
DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost xxx.xxx.xx.xx:80>
ServerAlias www.xxxx.domain1.com
ServerAdmin guillermo@xxxxxx.com
DocumentRoot /home/user1/public_html
ServerName xxxx.domain1.com

ErrorLog /home/user1/logs/error_log
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx.:80>
ServerAlias www.xxxx.domain2.com
ServerAdmin guillermo@xxxxxx.com
DocumentRoot /home/user2/public_html
ServerName xxxxx.domain2.com

ErrorLog /home/user2/logs/error_log
</VirtualHost>

the xxx.xxx.xxx. is a static IP and this apache is running into a VPS with a CentOS template but i think this doesnt change anything...

Well.. any suggestion will be very appreciatted!! :D

and sorry for my english!

cheers!!!
gRaL

martinfst 10th January 2007 16:30

Have you defined
Code:

NameVirtualHost xxx.xxx.xxx.xxx
in your httpd.conf?

gral 10th January 2007 17:24

you rock
 
Everything working great now!!

This forum rock!

well.. i really aprecciatte your help!!!

Thanks again!

gral 11th February 2007 00:26

Hi everyone;


I returned to have the same problem, in all my vhost i see the Apache Default page, the httpd.conf is equal the like the httpd.conf above., and with the NameVirtualHos defined :p ,

The only diference is the hostname DNSzone is hosted in other host than the other vhosts, but i thinks this is not the problem!.

Any suggestion around ??

Regards!
gRaL

falko 11th February 2007 14:44

Do you use one of the IP addresses in NameVirtualHost that you see in the output of
Code:

ifconfig
?
Also, are the DNS records of your domains ok? You can check with
Code:

dig domain.com


All times are GMT +2. The time now is 23:53.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.