Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Warnings usually do not stop apache from starting, is there anything else in your logs (/var/log/httpd/error.log)
    linux user # 503963

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    First make sure that apache is configured to start upon reboot:
    Code:
    chkconfig httpd --list
    It should say something like:
    Code:
    httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
    Which shows that it is enabled for run levels 3, 4, and 5. BTW, get your default runlevel with:
    Code:
    awk -F: '$1 ~ /id/{print $2}' /etc/inittab
    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:
    # 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>

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •