changes to co-domain dont apply

Discussion in 'Installation/Configuration' started by djtremors, Jul 27, 2006.

  1. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Hey all.... again!... ;)

    I've noticed something thats been happening again and again where I've made a domain change in ISPC and it doesn't apply until I restart apache. I've been ignoring it until it happened again today.

    I've come to the conclusion it's when I change the co-domain name and then Save it, wait a couple of seconds/minutes and find the site is still looking for the old name but the vhost httpd conf file shows the changes.
    When I apachectl restart, all comes good and it now recognises the new name of the co-domain of the site.

    Almost sounds as if any changes done to the co-domain name doesn't trigger a reload of apache.

    Can anyone confirm this?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check the /home/admispconfig/ispconfig/ispconfig.log file, is there a line that apache is reloaded after you add a co-domain or do you get any errors?
  3. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    I finally got it to happen again but noticed it didn't happen on changing co-domain info but just creating a new site.

    01.08.2006 - 08:38:55 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2339: WARNING: could not httpd -t &> /dev/null
    01.08.2006 - 08:38:55 => WARN - /root/ispconfig/scripts/lib/config.lib.php, Line 2345: httpd syntax seems to contain errors, reloading with old configuration

    this is a new site with these options only :

    php scripts
    php safe mode
    ftp access
    individual error pages
    (no apache directives)

    I can't see why this failed since we can't see what data it tested with the 'httpd -t' command.

    is there somewhere where we can see the chopped copy of the virtual host we can check what went wrong?
  4. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    ok ok.. found the file..

    Syntax error on line 26 of /etc/httpd/conf/vhosts/Vhosts_ispconfig.conf_01-08-06_08-38-55:
    Invalid command 'DirectoryIndex', perhaps misspelled or defined by a module not included in the server configuration

    Line 26:
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.jsp Default.htm default.htm

    so what am I missing?
  5. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    argh, just realised that file is only partial config so I changed the httpd.conf to include that 'so called' broken config and when i do a 'httpd -t' i now get the real error message below :

    Syntax error on line 30 of /etc/httpd/conf.d/php.conf:
    Invalid command 'DirectoryIndex'perhaps misspelled or defined by a module not included in the server configuration
    So inside php.conf I have :
    # PHP is an HTML-embedded scripting language which attempts to make it
    # easy for developers to write dynamically generated webpages.

    #LoadModule php4_module modules/
    LoadModule php5_module /home/httpd/libexec/

    # Use for PHP 4.x
    #AddHandler php-script  php

    # Cause the PHP interpreter handle files with a .php extension.
    # Ref:
    # Since 4.3.2RC the default Apache 2 sapi is the apache2handler and is no
    # longer filter based. Therefor you should use
    #AddType application/x-httpd-php php
    #AddType application/x-httpd-php-source phps

    <Files *.php>
    LimitRequestBody 20000000

    # Add index.php to the list of files that will be served as directory
    # indexes.
    DirectoryIndex index.php
    So i don't know why it's complaining about that. Is it possible that the Include conf/*.conf line in the main httpd.conf is in a bad spot which is loading before a number of required modules are not loaded???

    I might just move the line down a fair bit and see what happens........
  6. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    argh!! can't get it working with any old httpd.conf file.. even the original. I don't know what the hell I did (if I did).

    I tried moving the 'Include conf/*.conf' line further down but then other errors occur. confusing me really now...

    The original line starts just after all the LoadModule commands are loaded so I don't know why it's whinging about DirectoryIndex.


    --- 20 minutes later ---

    Found it.. well, sort of.. all the errors were (somehow) due to some modules not loaded.... AT ALL. I have no idea how this could've worked in the first place.

    I add :
    LoadModule authn_file_module modules/
    LoadModule authz_host_module modules/

    which where related to the unknown directives and now it comes up with 'Syntax OK' on the apache httpd -t test... *sigh*...

    worked it out myself but still worth saying thanks for the help anyway.

    01.08.2006 - 09:46:38 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2339: httpd -t &> /dev/null
    01.08.2006 - 09:46:38 => INFO - /root/ispconfig/scripts/lib/config.lib.php, Line 2341: httpd syntax ok
    Last edited: Aug 1, 2006
  7. falko

    falko Super Moderator ISPConfig Developer

    Glad it's working again. :)
    Looks as if the mod_dir module also wasn't loaded...

Share This Page