Blame SPECS/httpd.conf.xml

Packit 718f12
Packit 718f12
Packit 718f12
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
Packit 718f12
Packit 718f12
]>
Packit 718f12
Packit 718f12
 Copyright 2018 Red Hat, Inc.
Packit 718f12
Packit 718f12
 Licensed to the Apache Software Foundation (ASF) under one or more
Packit 718f12
 contributor license agreements.  See the NOTICE file distributed with
Packit 718f12
 this work for additional information regarding copyright ownership.
Packit 718f12
 The ASF licenses this file to You under the Apache License, Version 2.0
Packit 718f12
 (the "License"); you may not use this file except in compliance with
Packit 718f12
 the License.  You may obtain a copy of the License at
Packit 718f12
Packit 718f12
     http://www.apache.org/licenses/LICENSE-2.0
Packit 718f12
Packit 718f12
 Unless required by applicable law or agreed to in writing, software
Packit 718f12
 distributed under the License is distributed on an "AS IS" BASIS,
Packit 718f12
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Packit 718f12
 See the License for the specific language governing permissions and
Packit 718f12
 limitations under the License.
Packit 718f12
-->
Packit 718f12
Packit 718f12
<refentry>
Packit 718f12
  <refentryinfo>
Packit 718f12
    <title>httpd.conf</title>
Packit 718f12
    <productname>httpd</productname>
Packit 718f12
    <author><contrib>Author</contrib><surname>Orton</surname><firstname>Joe</firstname><email>jorton@redhat.com</email></author>
Packit 718f12
  </refentryinfo>
Packit 718f12
Packit 718f12
  <refmeta>
Packit 718f12
    <refentrytitle>httpd.conf</refentrytitle>
Packit 718f12
    <manvolnum>5</manvolnum>
Packit 718f12
  </refmeta>
Packit 718f12
  
Packit 718f12
  <refnamediv>
Packit 718f12
    <refname>httpd.conf</refname>
Packit 718f12
    <refpurpose>Configuration files for httpd</refpurpose>
Packit 718f12
  </refnamediv>
Packit 718f12
Packit 718f12
  <refsynopsisdiv>
Packit 718f12
    <para>
Packit 718f12
      <filename>/etc/httpd/conf/httpd.conf</filename>, 
Packit 718f12
      <filename>/etc/httpd/conf.modules.d</filename>,
Packit 718f12
      <filename>/etc/httpd/conf.d</filename>
Packit 718f12
    </para>
Packit 718f12
  </refsynopsisdiv>
Packit 718f12
  
Packit 718f12
  <refsect1>
Packit 718f12
    <title>Description</title>
Packit 718f12
Packit 718f12
    <para>The main configuration file for the <command>httpd</command> daemon is
Packit 718f12
    <filename>/etc/httpd/conf/httpd.conf</filename>.  The syntax of
Packit 718f12
    this file is described at 
Packit 718f12
    url="https://httpd.apache.org/docs/2.4/configuring.html"/>, and
Packit 718f12
    the full set of available directives is listed at 
Packit 718f12
    url="https://httpd.apache.org/docs/2.4/mod/directives.html"/>.
Packit 718f12
    </para>
Packit 718f12
Packit 718f12
    <refsect2>
Packit 718f12
      <title>Configuration structure</title>
Packit 718f12
Packit 718f12
      <para>The main configuration file
Packit 718f12
      (<filename>httpd.conf</filename>) sets up various defaults and
Packit 718f12
      includes configuration files from two directories -
Packit 718f12
      <filename>/etc/httpd/conf.modules.d</filename> and
Packit 718f12
      <filename>/etc/httpd/conf.d</filename>.  Packages containing
Packit 718f12
      loadable modules (like <option>mod_ssl.so</option>) place files
Packit 718f12
      in the <filename>conf.modules.d</filename> directory with the
Packit 718f12
      appropriate <option>LoadModule</option> directive so that module
Packit 718f12
      is loaded by default.</para>
Packit 718f12
Packit 718f12
      <para>Some notable configured defaults are:.</para>
Packit 718f12
Packit 718f12
      <variablelist>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><option>DocumentRoot @DOCROOT@/html</option></term>
Packit 718f12
          <listitem><para>The default document root from which content
Packit 718f12
          is served.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><option>Listen 80</option></term>
Packit 718f12
          <listitem><para>The daemon lists on TCP port 80.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><option>ErrorLog "logs/error_log"</option></term>
Packit 718f12
          <listitem><para>Error messages are logged to
Packit 718f12
          <filename>@LOGDIR@/error_log</filename>.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><option>ScriptAlias /cgi-bin/ "@DOCROOT@/cgi-bin/"</option></term>
Packit 718f12
          <listitem><para>CGI scripts are served via the URL-path <option>/cgi-bin/</option>.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        
Packit 718f12
      </variablelist>
Packit 718f12
Packit 718f12
      <para>To remove any of the default configuration provided in
Packit 718f12
      separate files covered below, replace that file with an empty
Packit 718f12
      file rather than removing it from the filesystem, otherwise it
Packit 718f12
      may be restored to the original when the package which provides
Packit 718f12
      it is upgraded.</para>
Packit 718f12
      
Packit 718f12
    </refsect2>
Packit 718f12
Packit 718f12
    <refsect2>
Packit 718f12
      <title>MPM configuration</title>
Packit 718f12
Packit 718f12
      <para>The configuration file at
Packit 718f12
      <filename>/etc/httpd/conf.modules.d/00-mpm.conf</filename> is
Packit 718f12
      used to select the multi-processing module (MPM), which governs
Packit 718f12
      how <command>httpd</command> divides work between processes
Packit 718f12
      and/or threads at run-time.  Exactly one
Packit 718f12
      <option>LoadModule</option> directive must be uncommented in
Packit 718f12
      this file; by default the <option>@MPM@</option> MPM is enabled.
Packit 718f12
      For more information on MPMs, see 
Packit 718f12
      url="https://httpd.apache.org/docs/2.4/mpm.html"/>.</para>
Packit 718f12
Packit 718f12
      <para>If using the <emphasis>prefork</emphasis> MPM, the
Packit 718f12
      "httpd_graceful_shutdown" SELinux boolean should also be
Packit 718f12
      enabled, since with this MPM, httpd needs to establish TCP
Packit 718f12
      connections to local ports to successfully complete a graceful
Packit 718f12
      restart or shutdown. This boolean can be enabled by running the
Packit 718f12
      command: <command>semanage boolean -m --on
Packit 718f12
      httpd_graceful_shutdown</command></para>
Packit 718f12
    </refsect2>
Packit 718f12
    
Packit 718f12
    <refsect2>
Packit 718f12
      <title>Module configuration files</title>
Packit 718f12
      
Packit 718f12
      <para>Module configuration files are provided in the
Packit 718f12
      <filename>/etc/httpd/conf.modules.d/</filename> directory.  Filenames
Packit 718f12
      in this directory are by convention prefixed with two digit numeric
Packit 718f12
      prefix to ensure they are processed in the desired order.  Core
Packit 718f12
      modules provide with the <command>httpd</command> package are
Packit 718f12
      loaded by files with a <option>0x-</option> prefix to ensure
Packit 718f12
      these are loaded first.  Only filenames with a
Packit 718f12
      <option>.conf</option> suffix in this directory will be
Packit 718f12
      processed.</para>
Packit 718f12
Packit 718f12
      <para>Other provided configuration files are listed below.
Packit 718f12
      
Packit 718f12
      <variablelist>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.modules.d/00-base.conf</filename></term>
Packit 718f12
          <listitem><para>The set of core modules included with
Packit 718f12
          <command>httpd</command> which are all loaded by
Packit 718f12
          default.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.modules.d/00-optional.conf</filename></term>
Packit 718f12
          <listitem><para>The set of non-core modules included with
Packit 718f12
          <command>httpd</command> which are <emphasis>not</emphasis>
Packit 718f12
          loaded by default.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        
Packit 718f12
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.modules.d/00-systemd.conf</filename></term>
Packit 718f12
          <listitem><para>This file loads <option>mod_systemd</option>
Packit 718f12
          which is necessary for the correct operation of the
Packit 718f12
          <command>httpd.service</command> service, and should not be
Packit 718f12
          removed or disabled.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
      </variablelist>
Packit 718f12
      </para>
Packit 718f12
    </refsect2>
Packit 718f12
        
Packit 718f12
    <refsect2>
Packit 718f12
      <title>Other configuration files</title>
Packit 718f12
Packit 718f12
      <para>Default module configuration files and site-specific
Packit 718f12
      configuration files are loaded from the
Packit 718f12
      <filename>/etc/httpd/conf.d/</filename> directory.  Only files
Packit 718f12
      with a <option>.conf</option> suffix will be loaded.  The
Packit 718f12
      following files are provided:
Packit 718f12
Packit 718f12
      <variablelist>
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.d/userdir.conf</filename></term>
Packit 718f12
          <listitem><para>This file gives an example configuration for
Packit 718f12
          <option>mod_userdir</option> to map URLs such as
Packit 718f12
          <option>http://localhost/~jim/</option> to
Packit 718f12
          <filename>/home/jim/public_html/</filename>. Userdir mapping
Packit 718f12
          is disabled by default.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.d/autoindex.conf</filename></term>
Packit 718f12
          <listitem><para>This file provides the default configuration
Packit 718f12
          for <option>mod_autoindex</option> which generates HTML
Packit 718f12
          directory listings when enabled.  It also makes file icon
Packit 718f12
          image files available at the <option>/icons/</option>
Packit 718f12
          URL-path.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.d/welcome.conf</filename></term>
Packit 718f12
          <listitem><para>This file enables a "welcome page" at
Packit 718f12
          <option>http://localhost/</option> if no content is present
Packit 718f12
          in the default documentation root
Packit 718f12
          <filename>/var/www/html</filename>.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
Packit 718f12
        <varlistentry>
Packit 718f12
          <term><filename>/etc/httpd/conf.d/ssl.conf</filename> (present only if <option>mod_ssl</option> is installed)</term>
Packit 718f12
          <listitem><para>This file configures a TLS
Packit 718f12
          <option>VirtualHost</option> listening on port
Packit 718f12
          <option>443</option>.  If the default configuration is used,
Packit 718f12
          the referenced test certificate and private key are
Packit 718f12
          generated the first time <command>httpd.service</command> is
Packit 718f12
          started; see
Packit 718f12
          <citerefentry><refentrytitle>httpd-init.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
Packit 718f12
          for more information.</para></listitem>
Packit 718f12
        </varlistentry>
Packit 718f12
        
Packit 718f12
      </variablelist></para>
Packit 718f12
    </refsect2>
Packit 718f12
    
Packit 718f12
    <refsect2>
Packit 718f12
      <title>Instantiated services</title>
Packit 718f12
Packit 718f12
      <para>As an alternative to (or in addition to) the
Packit 718f12
      <command>httpd.service</command> unit, the instantiated template
Packit 718f12
      service <command>httpd@.service</command> unit file can be used,
Packit 718f12
      which starts <command>httpd</command> using a different
Packit 718f12
      configuration file to the default. For example,
Packit 718f12
      <command>systemctl start httpd@foobar.service</command> will
Packit 718f12
      start httpd using the configuration file
Packit 718f12
      <filename>/etc/httpd/conf/foobar.conf</filename>.  See <citerefentry><refentrytitle>httpd@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> for more information.</para>
Packit 718f12
    </refsect2>
Packit 718f12
      
Packit 718f12
  </refsect1>
Packit 718f12
  <refsect1>
Packit 718f12
    <title>Files</title>
Packit 718f12
Packit 718f12
    <para>
Packit 718f12
      <filename>/etc/httpd/conf/httpd.conf</filename>, 
Packit 718f12
      <filename>/etc/httpd/conf.d</filename>, 
Packit 718f12
      <filename>/etc/httpd/conf.modules.d</filename>
Packit 718f12
    </para>
Packit 718f12
  </refsect1>
Packit 718f12
  
Packit 718f12
  <refsect1>
Packit 718f12
    <title>See also</title>
Packit 718f12
Packit 718f12
    <para>
Packit 718f12
    <citerefentry><refentrytitle>httpd</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 
Packit 718f12
    <citerefentry><refentrytitle>httpd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
Packit 718f12
    <ulink url="https://httpd.apache.org/docs/2.4/configuring.html"/>,
Packit 718f12
    <ulink url="https://httpd.apache.org/docs/2.4/mod/directives.html"/>
Packit 718f12
    </para>
Packit 718f12
  </refsect1>
Packit 718f12
Packit 718f12
</refentry>
Packit 718f12
Packit 718f12
Packit 718f12
-->