Tuesday, 8 August 2006
Restarting Apache on reboot
My VPS host box has had a few reboots in the last several months.
That aside, I have had to tweak my init scripts each time. Specifically, my httpd and tomcat scripts.
My httpd script is a hacked version of what is installed with most typical Fedora releases. I generally build Apache with each release to stay current (yeah, stop yer screaming, I play nice on my VPS).
The last reboot went almost unnoticed, until I tried to log in to this blog. My secure virtual host was not answering. I went poking around. My init script did not set the runtime parameter SSL, so the virtual host did not come up. Seems that the init script could support such a thing if I wanted to either of the following:
- Hard code "-D SSL" in the call to daemon
- Set the OPTIONS variable appropriately
I chose the latter. The OPTIONS variable is set in /etc/sysconfig/httpd, that is if that file is available. The files existence is tested in the httpd init script. This is a fairly common Fedora method of configuring services.
It then became a matter of:
# touch /etc/sysconfig/httpd
# vi !$
OPTIONS="-D SSL"
:wq
#
All as root of course. You may want to consider looking at your Apache configuration to see if you support SSL, and then possibly consider blocking those SSL directives to load only as needed (see the IfDefine and IfModule directives).
[Trackback URL for this entry]
