It seems to me that start case of apache init script should include --pidfile option like so: start-stop-daemon --start --pidfile "${PIDFILE}" ${APACHE2} -- ${APACHE2_OPTS} -k start s-s-d will try to find out if service is already runnig and will try to stop it before it will attempt to start it. If you don't supply --pidfile, s-s-d will look for service in /proc by name. It's all fine, unless you have lxc container that is running apache as well. s-s-d will find container apache in /proc by name, then it will try to kill it (this is already not what we want.) and fail. And after that s-s-d will fail to start service on the host on the ground that is already running. If you supply --pidfile s-s-d will search /proc by pid only and will not find service running in the lxc container.
The pidfile issue also affects running multiple apache instances: www-servers/apache-2.2.22-r1 Setting PIDFILE=/home/pmirror/run/apache2.pid in /etc/conf.d/pmirror has no affect. The pidfile is still created as /var/run/apache2.pid even though the rest of the conf variables are used, such as STARTUPERRORLOG="/var/log/apache2/pmirror-startuperror.log" A possibly related issue is that the startup is delayed for 5 seconds or so.