From 36d7a682414a54ad9b7c6a1a0b1dba29a52304df Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Nov 08 2018 17:13:42 +0000 Subject: add httpd.conf(5) (#1611361) Resolves: rhbz#1611361 --- diff --git a/.gitignore b/.gitignore index 00acede..bdeafe7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ x86_64 /httpd*.8 /results_httpd /htcacheclean.service.8 +/httpd.conf.5 diff --git a/README.confd b/README.confd index f5e9661..6071deb 100644 --- a/README.confd +++ b/README.confd @@ -5,5 +5,5 @@ processed as httpd configuration files. The directory is used in addition to the directory /etc/httpd/conf.modules.d/, which contains configuration files necessary to load modules. -Files are processed in alphabetical order. - +Files are processed in sorted order. See httpd.conf(5) for more +information. diff --git a/README.confmod b/README.confmod index d33d1d4..f4b055d 100644 --- a/README.confmod +++ b/README.confmod @@ -6,4 +6,5 @@ configuration fragments necessary only to load modules. Administrators should use the directory "/etc/httpd/conf.d" to modify the configuration of httpd, or any modules. -Files are processed in alphanumeric order. +Files are processed in sorted order and should have a two digit +numeric prefix. See httpd.conf(5) for more information. diff --git a/httpd.conf b/httpd.conf index a7af0dc..6ab68cb 100644 --- a/httpd.conf +++ b/httpd.conf @@ -6,6 +6,9 @@ # # for a discussion of each configuration directive. # +# See the httpd.conf(5) man page for more information on this configuration, +# and httpd.service(8) on using and configuring the httpd service. +# # Do NOT simply read the instructions in here without understanding # what they do. They're here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. diff --git a/httpd.conf.xml b/httpd.conf.xml new file mode 100644 index 0000000..fdf02b7 --- /dev/null +++ b/httpd.conf.xml @@ -0,0 +1,260 @@ + + + + + + + httpd.conf + httpd + AuthorOrtonJoejorton@redhat.com + + + + httpd.conf + 5 + + + + httpd.conf + Configuration files for httpd + + + + + /etc/httpd/conf/httpd.conf, + /etc/httpd/conf.modules.d, + /etc/httpd/conf.d + + + + + Description + + The httpd daemon uses a main + configuration file at + /etc/httpd/conf/httpd.conf. The syntax of + this file is described at , and + the full set of available directives at . + + + + Configuration structure + + The main configuration file + (httpd.conf) sets up various defaults and + includes configuration files from two directories - + /etc/httpd/conf.modules.d and + /etc/httpd/conf.d. Packages containing + loadable modules (like ) place files + in the conf.modules.d directory with the + appropriate directive so that module + is loaded by default. + + Some notable configured defaults are:. + + + + + The default document root from which content + is served. + + + + The daemon lists on TCP port 80. + + + + Error messages are logged to + @LOGDIR@/error_log. + + + + CGI scripts are served via the URL-path . + + + + + To remove any of the default configuration provided in + separate files covered below, replace that file with an empty + file rather than removing it from the filesystem, otherwise it + may be restored to the original when the package which provides + it is upgraded. + + + + + MPM configuration + + The configuration file at + /etc/httpd/conf.modules.d/00-mpm.conf is + used to select the multi-processing module (MPM), which governs + how httpd divides work between processes + and/or threads at run-time. Exactly one + directive must be uncommented in + this file; by default the MPM is enabled. + For more information on MPMs, see . + + If using the prefork MPM, the + "httpd_graceful_shutdown" SELinux boolean should also be + enabled, since with this MPM, httpd needs to establish TCP + connections to local ports to successfully complete a graceful + restart or shutdown. This boolean can be enabled by running the + command: semanage boolean -m --on + httpd_graceful_shutdown + + + + Module configuration files + + Module configuration files are provided in the + /etc/httpd/conf.modules.d/ directory, with + names which are by convention prefixed with two digit numeric + prefix to ensure they are processed in the desired order. Core + modules provide with the httpd package are + loaded by files with a prefix to ensure + these are loaded first. Only filenames with a + suffix in this directory will be + processed. + + Other provided configuration files are listed below. + + + + /etc/httpd/conf.modules.d/00-base.conf + The set of core modules included with + httpd which are all loaded by + default. + + + + /etc/httpd/conf.modules.d/00-optional.conf + The set of non-core modules included with + httpd which are not + loaded by default. + + + + + /etc/httpd/conf.modules.d/00-systemd.conf + This file loads + which is necessary for the correct operation of the + httpd.service service, and should not be + removed or disabled. + + + + + + + Other configuration files + + Default module configuration files and site-specific + configuration files are loaded from the + /etc/httpd/conf.d/ directory. Only files + with a suffix will be loaded. The + following files are provided: + + + + /etc/httpd/conf.d/userdir.conf + This file gives an example configuration for + to map URLs such as + to + /home/jim/public_html/. Userdir mapping + is disabled by default. + + + + /etc/httpd/conf.d/autoindex.conf + This file provides the default configuration + for which generates HTML + directory listings when enabled. It also makes file icon + image files available at the + URL-path. + + + + /etc/httpd/conf.d/welcome.conf + This file enables a "welcome page" at + if no content is present + in the default documentation root + /var/www/html. + + + + /etc/httpd/conf.d/ssl.conf (present only if is installed) + This file configures a TLS + listening on port + . If the default configuration is used, + the referenced test certificate and private key are + generated the first time httpd.service is + started; see + httpd-init.service8 + for more information. + + + + + + + Instantiated services + + As an alternative to (or in addition to) the + httpd.service unit, the instatiated template + service httpd@.service unit file can be used, + which starts httpd using a different + configuration file to the default. For example, + systemctl start httpd@foobar.service will + start httpd using the configuration file + /etc/httpd/conf/foobar.conf. See httpd@.service8 for more information. + + + + + Files + + + /etc/httpd/conf/httpd.conf, + /etc/httpd/conf.d, + /etc/httpd/conf.modules.d + + + + + See also + + + httpd8, + httpd.service8, + , + + + + + + + diff --git a/httpd.service.xml b/httpd.service.xml index 4a6038d..b2c72dd 100644 --- a/httpd.service.xml +++ b/httpd.service.xml @@ -188,17 +188,10 @@ Wants=network-online.target httpd offers a choice of multi-processing modules (MPMs), which can be configured in - /etc/httpd/conf.modules.d/00-mpm.conf. The - default is to use the @MPM@ MPM. - - If using the prefork MPM, the - "httpd_graceful_shutdown" SELinux boolean should also be - enabled, since with this MPM, httpd needs to establish TCP - connections to local ports to successfully complete a graceful - restart or shutdown. This boolean can be enabled by running the - command: semanage boolean -m --on - httpd_graceful_shutdown - + /etc/httpd/conf.modules.d/00-mpm.conf. + See + httpd.conf5 + for more information on changing the MPM. @@ -322,6 +315,7 @@ ReloadPropagatedFrom=httpd.service httpd8, + httpd.conf5, systemd1, systemctl1, systemd.service5, diff --git a/httpd.spec b/httpd.spec index f242ddb..5f68c0b 100644 --- a/httpd.spec +++ b/httpd.spec @@ -13,7 +13,7 @@ Summary: Apache HTTP Server Name: httpd Version: 2.4.37 -Release: 3%{?dist} +Release: 4%{?dist} URL: https://httpd.apache.org/ Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: index.html @@ -266,11 +266,16 @@ if test "x${vmmn}" != "x%{mmn}"; then exit 1 fi -sed 's/@MPM@/%{mpm}/' < $RPM_SOURCE_DIR/httpd.service.xml \ - > httpd.service.xml +sed ' +s,@MPM@,%{mpm},g +s,@DOCROOT@,%{docroot},g +s,@LOGDIR@,%{_localstatedir}/log/httpd,g +' < $RPM_SOURCE_DIR/httpd.conf.xml \ + > httpd.conf.xml -xmlto man ./httpd.service.xml +xmlto man ./httpd.conf.xml xmlto man $RPM_SOURCE_DIR/htcacheclean.service.xml +xmlto man $RPM_SOURCE_DIR/httpd.service.xml : Building with MMN %{mmn}, MMN-ISA %{mmnisa} : Default MPM is %{mpm}, vendor string is '%{vstring}' @@ -491,10 +496,13 @@ mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d install -m 644 -p $RPM_SOURCE_DIR/httpd.logrotate \ $RPM_BUILD_ROOT/etc/logrotate.d/httpd -# Install systemd service man pages +# Install man pages +install -d $RPM_BUILD_ROOT%{_mandir}/man8 $RPM_BUILD_ROOT%{_mandir}/man5 install -m 644 -p httpd.service.8 httpd-init.service.8 httpd.socket.8 \ httpd@.service.8 htcacheclean.service.8 \ $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 644 -p httpd.conf.5 \ + $RPM_BUILD_ROOT%{_mandir}/man5 # fix man page paths sed -e "s|/usr/local/apache2/conf/httpd.conf|/etc/httpd/conf/httpd.conf|" \ @@ -660,6 +668,7 @@ exit $rv %attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd/proxy %{_mandir}/man8/* +%{_mandir}/man5/* %exclude %{_mandir}/man8/httpd-init.* %{_unitdir}/httpd.service @@ -729,6 +738,9 @@ exit $rv %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Thu Nov 8 2018 Joe Orton - 2.4.37-4 +- add httpd.conf(5) (#1611361) + * Wed Nov 07 2018 Luboš Uhliarik - 2.4.37-3 - Resolves: #1647241 - fix apachectl script