Might be a good idea to check the apache config before restarting the apache server whenever this is done. If apache2ctl configtest returns an error, report back that whatever process it was called from and don't actually restart apache.
I'm using the experimental SSL features and have been burned by misconfiguration a couple times. Unfortunately, I'm no programmer and that's why I'm not offering a patch, just an idea. Seems like it wouldn't be too hard to do this test just before restarting apache and would add value.
Thanks for your consideration.
Comments
Comment #1
anarcat commentedThat should indeed be done.
Comment #2
adrian commentedSo the painful part here is that we don't configure a 'path to apache2ctl' , we configure a 'restart command'. So we can't actually rely on being able to call it without the last argument and replace it with configtest.
Additionally, we are now passing it over to different servers, and it would mean we would need to run the command there too.
Comment #3
adrian commentedthis is not critical
Comment #4
Anonymous (not verified) commentedMarking this a duplicate of #266030: Use httpd -S / apache2ctl configtest as a sanity check before restarting as it's pretty much the same, sanity checks of web server before restarting it.