Results 1 to 3 of 3
Hi,
when rebooting the server, it won't start httpd anymore
I get this error:
[warn] VirtualHost 127.0.0.1:0 overlaps with VirtualHost 127.0.0.1:0, the first has precedence, perhaps you need a NameVirtualHost ...
- 01-11-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 1
Centos 5 httpd error with virtualhosts, please help
Hi,
when rebooting the server, it won't start httpd anymore
I get this error:
[warn] VirtualHost 127.0.0.1:0 overlaps with VirtualHost 127.0.0.1:0, the first has precedence, perhaps you need a NameVirtualHost directive
[Wed Jan 11 04:00:37 2012] [warn] NameVirtualHost 66.90.87.238:80 has no VirtualHosts
[Wed Jan 11 04:00:37 2012] [warn] NameVirtualHost 66.90.87.238:443 has no VirtualHosts
[Wed Jan 11 04:00:37 2012] [warn] NameVirtualHost 66.90.87.237:80 has no VirtualHosts
[Wed Jan 11 04:00:37 2012] [warn] NameVirtualHost 66.90.87.237:443 has no VirtualHosts
[Wed Jan 11 04:00:37 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
hope someone can help me, cause I can't
regards,
Syanto
- 01-11-2012 #2
Warnings usually do not stop apache from starting, is there anything else in your logs (/var/log/httpd/error.log)
linux user # 503963
- 01-11-2012 #3Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
First make sure that apache is configured to start upon reboot:
It should say something like:Code:chkconfig httpd --list
Which shows that it is enabled for run levels 3, 4, and 5. BTW, get your default runlevel with:Code:httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
It sounds like you added some VirtualHost stuff to an apache config file, yes? When you add them, you need to be sure to include a default container. Here's a primitive example (it could be /etc/httpd/conf.d/vhosts.conf):Code:awk -F: '$1 ~ /id/{print $2}' /etc/inittab
Code:# default container # Virtual hosts NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/var/www/html" ServerName localhost </VirtualHost> # foo website <VirtualHost *:80> DocumentRoot /var/www/html/www.example.com ServerName www.example.com ErrorLog logs/www.example.com-error_log CustomLog logs/www.example.com-access_log common <Directory "/var/www/html/www.example.com"> Options Indexes FollowSymlinks MultiViews AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>


Reply With Quote