httpd.conf overwritten by package updater

Discussion in 'Installation/Configuration' started by davers, Jun 2, 2009.

  1. davers

    davers New Member

    I recently updated my apache and accidentally overwrote my httpd.conf. Now none of my virtual hosts are working that were set up in ispconfig. Is there an easy way to re-write the httpd.conf and get everything back in order without losing my data (sites, settings, etc..)?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Add the following lines at the end of httpd.conf file and restart apache:

    Code:
    <Directory /var/www/sharedip>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    ###############ispconfig_log###############
    LogFormat "%v||||%b||||%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig
    CustomLog "|/root/ispconfig/cronolog --symlink=/var/log/httpd/ispconfig_access_log /var/log/httpd/ispconfig_access_log_%Y_%m_%d" combined_ispconfig
    
    <Directory /var/www/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    <Directory /var/www/*/user/*/web>
        Options +Includes -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
        Options +Indexes
    </Directory>
    
    <Directory /var/www/*/cgi-bin>
        Options ExecCGI -Indexes
        AllowOverride None
        AllowOverride Indexes AuthConfig Limit FileInfo
        Order allow,deny
        Allow from all
        <Files ~ "^\.ht">
        Deny from all
        </Files>
    </Directory>
    
    Include /etc/apache2/vhosts/Vhosts_ispconfig.conf
     
  3. davers

    davers New Member

    new problem

    that worked but not i'm getting the following


    ... waiting .[Tue Jun 02 17:17:03 2009] [warn] VirtualHost 192.168.192.100:80 overlaps with VirtualHost 192.168.192.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
    [Tue Jun 02 17:17:03 2009] [warn] VirtualHost 192.168.192.100:80 overlaps with VirtualHost 192.168.192.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
    [Tue Jun 02 17:17:03 2009] [warn] VirtualHost 192.168.192.100:80 overlaps with VirtualHost 192.168.192.100:80, the first has precedence, perhaps you need a NameVirtualHost directive
    [Tue Jun 02 17:17:03 2009] [warn] NameVirtualHost 192.168.0.1:80 has no VirtualHosts
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Then the file was most likely not overwritten by the updater as you now seem to have the code that I posted above twice in your config files. Make sure that it is not in another file like apache2.conf or apache.conf.
     

Share This Page