create instance-specific StateDir in httpd@.service, instance.conf

This commit is contained in:
Joe Orton 2019-06-21 09:00:52 +01:00
parent eb4dbe737f
commit b18b77bc68
3 changed files with 9 additions and 3 deletions

View File

@ -13,7 +13,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.39
Release: 8%{?dist}
Release: 9%{?dist}
URL: https://httpd.apache.org/
Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@ -739,6 +739,9 @@ exit $rv
%{_rpmconfigdir}/macros.d/macros.httpd
%changelog
* Fri Jun 21 2019 Joe Orton <jorton@redhat.com> - 2.4.39-9
- create instance-specific StateDir in httpd@.service, instance.conf
* Thu Jun 20 2019 Joe Orton <jorton@redhat.com> - 2.4.39-8
- remove superfluous ap_hack_ symbols from httpd binary
- more verbose %%check section

View File

@ -12,6 +12,8 @@ Environment=LANG=C
Environment=HTTPD_INSTANCE=%i
ExecStartPre=/bin/mkdir -m 710 -p /run/httpd/instance-%i
ExecStartPre=/bin/chown root.apache /run/httpd/instance-%i
ExecStartPre=/bin/mkdir -m 700 -p /var/lib/httpd/instance-%i
ExecStartPre=/bin/chown apache.apache /var/lib/httpd/instance-%i
ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND -f conf/%i.conf
ExecReload=/usr/sbin/httpd $OPTIONS -k graceful -f conf/%i.conf
# Send SIGWINCH for graceful stop

View File

@ -1,6 +1,6 @@
#
# This is an example instance-specific configuration file. See the
# httpd.service(8) man page for detailed information on using the
# httpd@.service(8) man page for detailed information on using the
# the httpd@.service with instances.
#
# To use this example, copy instance.conf to /etc/httpd/conf/foobar.conf
@ -10,7 +10,7 @@
# # systemctl start httpd@foobar.service
#
# The changes compared to the default are:
# - DefaultRuntime and Pidfile renamed to be instance-specific
# - DefaultRuntime, DefaultStateDir and Pidfile renamed to instance-specific
# - default logfile names are prefixed with the instance name
# - /etc/httpd/conf.d is NOT included by default (conf.modules.d still is)
#
@ -20,4 +20,5 @@
#
DefaultRuntimeDir /run/httpd/instance-${HTTPD_INSTANCE}
DefaultStateDir /var/lib/httpd/instance-${HTTPD_INSTANCE}
PidFile /run/httpd/instance-${HTTPD_INSTANCE}.pid