The new apache init.d script (as of version 2.0.59-r5) hardcodes the pidfile in the start, stop, and reload functions. For the default setup, this does not cause a problem, but it does for more complicated configurations. In our case, we have multiple instances of apache running on different ports to serve different purposes. '/etc/init.d/apache2_admin' and '/etc/init.d/apache2_virtualhost' are both symlinks to '/etc/init.d/apache2'. They each have their own files in '/etc/conf.d' where their individual pidfiles are specified using the variable PIDFILE. Unfortunately, the new init.d script for apache2 hardcodes '/var/run/apache2.pid', so it can't (and shouldn't) find it when trying to restart apache2_virtualhost or apache2_admin. Shouldn't the init.d script check to see if PIDFILE is set first in the /etc/conf.d file? If it isn't, it can set a reasonable default (/var/run/apache2.pid). The start, stop, and reload functions should then use '--pidfile ${PIDFILE}'. Does this seem reasonable? Reproducible: Always Steps to Reproduce: 1./etc/init.d/apache2_admin start 2./etc/init.d/apache2_admin restart 3. Actual Results: Can't find /var/run/apache2.pid Expected Results: Script finds /var/run/apache2_admin.pid and restarts the application.
Sorry, we are not going to break the initscript once again. If you need customized setup, customize the initscript as well. It works for supported use cases just fine. Running multiple apache instances is not supported.