Should I fix "[warn] NameVirtualHost 'ip' has no VirtualHosts

Discussion in 'General' started by HellMind, Mar 29, 2009.

  1. HellMind

    HellMind Member

    /etc/cron.daily/logrotate:
    [Sun Mar 29 06:25:09 2009] [warn] NameVirtualHost 190.210.x.x:80 has no VirtualHosts
    [Sun Mar 29 06:25:09 2009] [warn] NameVirtualHost 190.210.x.x:443 has no VirtualHosts

    Should/Can I fix it?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no need to do anything, but you can remove the ip's from the ip list as you dont have virtual hosts with these IP's.
     
  3. HellMind

    HellMind Member

    Then I create a site I use IP * is that bad?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, why should that be bad? By the way, If you would have created a site with that Ip the error message would not have been appeared.
     
  5. HellMind

    HellMind Member

    I think that error appear because I configured ispconfig with that ip but not the in sites.
     
  6. HellMind

    HellMind Member

    Where is that ip list you are talking about?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    System > Server IP addresses.
     
  8. defconjuan

    defconjuan New Member

    I know this is old but I came accross this and it bugged the heck out of me (I hate error messages).

    [warn] NameVirtualHost *:443 has no VirtualHosts

    Simply Put: Apache is listening on 443 but there are no VirtualHosts (websites) defined on that port. (See /etc/apache2/ports.conf):
    Code:
    NameVirtualHost *:80
    Listen 80
    
    <IfModule mod_ssl.c>
        NameVirtualHost *:443
        Listen 443
    </IfModule>
    
    <IfModule mod_gnutls.c>
        NameVirtualHost *:443
        Listen 443
    </IfModule>
    
    You have two options to get rid of the harmless error message:

    Option 1 - Enable the default SSL config (Preferred, less destructive)
    Define a site on 443 (the easiest way is to run the following code):
    Code:
    ln -s /etc/apache2/sites-available/default-ssl 000-default-ssl
    # then restart apache
    /etc/init.d/apache2 restart
    
    Option 2 - Unbind Apache from Port 443
    Comment out the "NameVirtualHost *:443" and "Listen 443" lines of /etc/apache2/ports.conf (e.g. add a # symbol in from of those lines so the new ports config file looks something like:)
    Code:
    NameVirtualHost *:80
    Listen 80
    
    <IfModule mod_ssl.c>
        # NameVirtualHost *:443
        # Listen 443
    </IfModule>
    
    <IfModule mod_gnutls.c>
        # NameVirtualHost *:443
        # Listen 443
    </IfModule>
    
     

Share This Page