[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Restarting Apache via a script



Hi Marek,

Marek Podmaka wrote:
Hello Simon,

  I think the best you can do is ensure that your script WILL produce
  valid configuration. That means allowing your users to add only
  valid vhosts, with valid chars, valid length, etc. The front-end
  should verify this. And your script should be sure that it takes it
  from db and makes proper conf files for apache.

  I am using similar approach with apache1.3 for about year. My script
  never produced invalid conf files, but few times apache refused to
  start with some conf error - but there was no error and manual start
  worked fine. So you should and a check if apache is still running
  after your restart.

Yes.. Its the same approch that im taking. Im just going to add a little script that fires off a Email/TXT message if the output of 'ps u -U www-data' shows no processes after a restart...

Or, even better... when the 'update' process sees a addition/change, backup the conf files, restart apache, and if it does not start for some reason after a restart, roleback the config and start?



Reply to: