PDA

View Full Version : Apache vhost problem!


gral
10th January 2007, 17:28
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, 17:30
Have you definedNameVirtualHost xxx.xxx.xxx.xxxin your httpd.conf?

gral
10th January 2007, 18:24
Everything working great now!!

This forum rock!

well.. i really aprecciatte your help!!!

Thanks again!

gral
11th February 2007, 01: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, 15:44
Do you use one of the IP addresses in NameVirtualHost that you see in the output of ifconfig?
Also, are the DNS records of your domains ok? You can check with
dig domain.com