diff --git a/httpd.spec b/httpd.spec index 860f8af..32cb463 100644 --- a/httpd.spec +++ b/httpd.spec @@ -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 - 2.4.39-9 +- create instance-specific StateDir in httpd@.service, instance.conf + * Thu Jun 20 2019 Joe Orton - 2.4.39-8 - remove superfluous ap_hack_ symbols from httpd binary - more verbose %%check section diff --git a/httpd@.service b/httpd@.service index c58ae88..7649dff 100644 --- a/httpd@.service +++ b/httpd@.service @@ -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 diff --git a/instance.conf b/instance.conf index f2b03f7..074fb66 100644 --- a/instance.conf +++ b/instance.conf @@ -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