Apache: configtest before restart?

Discussion in 'Feature Requests' started by mike_p, Jun 3, 2010.

  1. mike_p

    mike_p Member

    Just chucking an idea into the pot....

    If apache is restarted using apachectl script it first runs configtest before attempting a restart.

    If apache is restarted using /etc/init.d/httpd script it doesn't run configtest before attempting a restart.

    I think ISPConfig should run a configuration check before a restart (to prevent IPSConfig becoming unuseable.)

    The restart is triggered in server/mods-available/web_module.inc.php.

    If we included a config test before restarting, where would the sensible place be to report an error if it fails the config test?
  2. mike_p

    mike_p Member

    I've just had a quick read of the apache documentation and it seems it would be possible to run a configtest as a non-root user: although it won't be a perfect test it will check syntax happily.

    With regards to ISPconfig, any action that would require a restart can be checked before being sent to the queue? Or could items in the job queue be marked with a 'pending' tag until configuration errors have been fixed?
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    This wont work as ISPConfig is a multiserver controlpanel and you can not assume that the interface runs on the same server then the apache webserver.

    But what we can do is to add a configtest in the apache server plugin. One problem with the configtest is that is is not able to find problems related to ssl certificates do not throw an error when running the config test but apache will not restart.

Share This Page