Virtual Host errors

Discussion in 'General' started by minimalist, Dec 10, 2007.

  1. minimalist

    minimalist Member

    /etc/cron.daily/logrotate:
    [Sun Dec 09 06:25:04 2007] [warn] The Alias directive in /etc/apache2/apache2.conf at line 240 will probably never match because it overlaps an earlier Alias.
    [Sun Dec 09 06:25:04 2007] [warn] NameVirtualHost XX.XX.XXX.XXX:80 has no VirtualHosts

    I've attached the .conf files. There are some issues that we already spotted like some double entries.

    Any advice? Help please?
     

    Attached Files:

    Last edited: May 10, 2008
  2. falko

    falko Super Moderator ISPConfig Developer

    The line in question is
    Code:
    Alias /icons/ "/usr/share/apache2/icons/"
    Did you check in
    /etc/apache2/mods-enabled/*.load
    /etc/apache2/mods-enabled/*.conf
    /etc/apache2/httpd.conf
    /etc/apache2/ports.conf
    /etc/apache2/conf.d/
    if there's something similar in there?
     
  3. minimalist

    minimalist Member

    Obviously /etc/apache2/mods-enabled/alias.conf contains the
    Code:
    Alias /icons/ "/usr/share/apache2/icons/"
    just like /etc/apache2/apache2.conf.

    What about the second [warn]?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Comment that one out and restart Apache.

    You can ignore that. It means that you have a NameVirtualHost 82.77.190.212:80 line in your configuration, but no vhosts for 82.77.190.212.
     
  5. minimalist

    minimalist Member

    Did that, thanks!

    Fact is all my domains are vhosts for XX.XX.XXX.XXX.
    Code:
    NameVirtualHost XX.XX.XXX.XXX:80
    <VirtualHost XX.XX.XXX.XXX:80>
      ServerName localhost
      ServerAdmin [email protected]
      DocumentRoot /var/www/sharedip
    </VirtualHost>
    #
    #
    ######################################
    # Vhost: www.domain.com:80
    ######################################
    #
    #
    <VirtualHost XX.XX.XXX.XXX:80>
    ServerName www.domain.com:80
    ServerAdmin [email protected]
    DocumentRoot /var/www/web4/web
    ServerAlias domain.com
    DirectoryIndex index.html... and so on...
    What am I missing? Can I safely ignore it?
     
    Last edited: May 10, 2008
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    ifconfig
    ?
     
  7. minimalist

    minimalist Member

    Code:
    [email protected]:~# ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:13:8F:E0:58:CA  
              inet addr:XX.XX.XXX.XXX  Bcast:XX.XX.XXX.255  Mask:255.255.255.192
              inet6 addr: fe80::213:8fff:fee0:58ca/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:3154493 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1961577 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:451012829 (430.1 MB)  TX bytes:2234218694 (2.0 GB)
              Interrupt:21 Base address:0x8000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:50299 errors:0 dropped:0 overruns:0 frame:0
              TX packets:50299 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:31368465 (29.9 MB)  TX bytes:31368465 (29.9 MB)
    
     
    Last edited: May 10, 2008
  8. falko

    falko Super Moderator ISPConfig Developer

    Do you maybe have
    Code:
    NameVirtualHost 82.77.190.212:80
    twice in your configuration?
     
  9. minimalist

    minimalist Member

    That was my first guess too but when I try to comment out the NameVirtualHost directive from Vhosts_ispconfig.conf I get [warn] VirtualHost XX.XX.XXX.XXX:80 overlaps with VirtualHost XX.XX.XXX.XXX:80, the first has precedence, perhaps you need a NameVirtualHost directive errors for all my domains. Obviously there's something elese someplace... I've never messed around with ISPConfig files, only did the regular updates.
     
    Last edited: May 10, 2008
  10. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    Code:
    httpd -t
    ?
     
  11. minimalist

    minimalist Member

    Code:
    [email protected]:~# httpd -t
    [Tue Dec 18 22:34:40 2007] [warn] NameVirtualHost XX.XX.XXX.XXX:80 has no VirtualHosts
    Syntax OK
     
    Last edited: May 10, 2008
  12. falko

    falko Super Moderator ISPConfig Developer

    Not sure what the problem is, but it's only a warning, so you can ignore it. :)
     
  13. khayjake

    khayjake Member

    Hey Falko, I'm running your ISPConfig 2 and I had that

    "duplicate alias will never match overlapes earlier alias"

    Error also. /etc/apache2/mods-enabled/alias.conf is symbolically linked to ../mods-available/alias.conf as you said to do in your tutorial back when I set it up on Debian Etch.

    My question is, does it matter if you comment it out in alias.conf or apache2.conf? Or does it matter?

    I went ahead & commented it out in alias.conf instead of line 240 in apache2.conf like you said. Just curious if it matters or not.

    Thanks
     

Share This Page