Bug#838932: apache2: multiple apache instances don't start after reboot without the default apache enabled
Package: apache2
Version: 2.4.10-10+deb8u7
Severity: minor
Tags: patch
Dear Maintainer,
multiple apache instances don't start after reboot without the default
apache enabled.
:~# sh /usr/share/doc/apache2/examples/setup-instance xxx
:~# sh /usr/share/doc/apache2/examples/setup-instance yyy
:~# systemctl enable apache2-xxx
:~# systemctl enable apache2-yyy
disable default installed apache because ist should only the template
for the suffix apaches
:~# systemctl disable apache2
:~# shutdown -r now
/var/run/apache2 ist now no longer available because tmpfs
:~# cat /var/log/apache2-zzz/error.log
[...]
[Sat Sep 24 11:10:00.566132 2016] [core:error] [pid 2229] AH00100:
apache2: could not log pid to file /var/run/apache2/apache2-xxx.pid
[...]
solution
:~# vim /etc/apache2-xxx/envvars
:~# vim /etc/apache2-yyy/envvars
[...]
#export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2$SUFFIX.pid
or rather in /etc/apache2/envvars
- - - - - - - - - - - - - - - - - - - - - - - -
patch for /etc/apache2/envvars
--- envvars 2016-09-25 10:54:40.901929219 +0200
+++ envvars.new 2016-09-25 10:54:08.113544407 +0200
@@ -16,7 +16,7 @@ fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
-export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
+export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
it is also attached
- - - - - - - - - - - - - - - - - - - - - - - -
Versions of packages apache2 is related to:
ii apache2 2.4.10-10+deb8u7
ii apache2-bin 2.4.10-10+deb8u7
-- System Information:
Debian Release: 8.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
- - - - - - - - - - - - - - - - - - - - - - - -
you can look also to ubuntu launchpad where i have the bug reported first
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1627339
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1627339/comments/5
File to fix is part of packaging debian/config-dir/envvars
- - - - - - - - - - - - - - - - - - - - - - - -
kind regards horst
--- envvars 2016-09-25 10:54:40.901929219 +0200
+++ envvars.new 2016-09-25 10:54:08.113544407 +0200
@@ -16,7 +16,7 @@ fi
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
# temporary state file location. This might be changed to /run in Wheezy+1
-export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid
+export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2$SUFFIX.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX
# Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.
Reply to: