Blame SOURCES/httpd.conf

59234c
#
59234c
# This is the main Apache HTTP server configuration file.  It contains the
59234c
# configuration directives that give the server its instructions.
59234c
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
59234c
# In particular, see 
59234c
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
59234c
# for a discussion of each configuration directive.
59234c
#
59234c
# See the httpd.conf(5) man page for more information on this configuration,
59234c
# and httpd.service(8) on using and configuring the httpd service.
59234c
#
59234c
# Do NOT simply read the instructions in here without understanding
59234c
# what they do.  They're here only as hints or reminders.  If you are unsure
59234c
# consult the online docs. You have been warned.  
59234c
#
59234c
# Configuration and logfile names: If the filenames you specify for many
59234c
# of the server's control files begin with "/" (or "drive:/" for Win32), the
59234c
# server will use that explicit path.  If the filenames do *not* begin
59234c
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
59234c
# with ServerRoot set to '/www' will be interpreted by the
59234c
# server as '/www/log/access_log', where as '/log/access_log' will be
59234c
# interpreted as '/log/access_log'.
59234c
59234c
#
59234c
# ServerRoot: The top of the directory tree under which the server's
59234c
# configuration, error, and log files are kept.
59234c
#
59234c
# Do not add a slash at the end of the directory path.  If you point
59234c
# ServerRoot at a non-local disk, be sure to specify a local disk on the
59234c
# Mutex directive, if file-based mutexes are used.  If you wish to share the
59234c
# same ServerRoot for multiple httpd daemons, you will need to change at
59234c
# least PidFile.
59234c
#
59234c
ServerRoot "/etc/httpd"
59234c
59234c
#
59234c
# Listen: Allows you to bind Apache to specific IP addresses and/or
59234c
# ports, instead of the default. See also the <VirtualHost>
59234c
# directive.
59234c
#
59234c
# Change this to Listen on specific IP addresses as shown below to 
59234c
# prevent Apache from glomming onto all bound IP addresses.
59234c
#
59234c
#Listen 12.34.56.78:80
59234c
Listen 80
59234c
59234c
#
59234c
# Dynamic Shared Object (DSO) Support
59234c
#
59234c
# To be able to use the functionality of a module which was built as a DSO you
59234c
# have to place corresponding `LoadModule' lines at this location so the
59234c
# directives contained in it are actually available _before_ they are used.
59234c
# Statically compiled modules (those listed by `httpd -l') do not need
59234c
# to be loaded here.
59234c
#
59234c
# Example:
59234c
# LoadModule foo_module modules/mod_foo.so
59234c
#
59234c
Include conf.modules.d/*.conf
59234c
59234c
#
59234c
# If you wish httpd to run as a different user or group, you must run
59234c
# httpd as root initially and it will switch.  
59234c
#
59234c
# User/Group: The name (or #number) of the user/group to run httpd as.
59234c
# It is usually good practice to create a dedicated user and group for
59234c
# running httpd, as with most system services.
59234c
#
59234c
User apache
59234c
Group apache
59234c
59234c
# 'Main' server configuration
59234c
#
59234c
# The directives in this section set up the values used by the 'main'
59234c
# server, which responds to any requests that aren't handled by a
59234c
# <VirtualHost> definition.  These values also provide defaults for
59234c
# any <VirtualHost> containers you may define later in the file.
59234c
#
59234c
# All of these directives may appear inside <VirtualHost> containers,
59234c
# in which case these default settings will be overridden for the
59234c
# virtual host being defined.
59234c
#
59234c
59234c
#
59234c
# ServerAdmin: Your address, where problems with the server should be
59234c
# e-mailed.  This address appears on some server-generated pages, such
59234c
# as error documents.  e.g. admin@your-domain.com
59234c
#
59234c
ServerAdmin root@localhost
59234c
59234c
#
59234c
# ServerName gives the name and port that the server uses to identify itself.
59234c
# This can often be determined automatically, but we recommend you specify
59234c
# it explicitly to prevent problems during startup.
59234c
#
59234c
# If your host doesn't have a registered DNS name, enter its IP address here.
59234c
#
59234c
#ServerName www.example.com:80
59234c
59234c
#
59234c
# Deny access to the entirety of your server's filesystem. You must
59234c
# explicitly permit access to web content directories in other 
59234c
# <Directory> blocks below.
59234c
#
59234c
<Directory />
59234c
    AllowOverride none
59234c
    Require all denied
59234c
</Directory>
59234c
59234c
#
59234c
# Note that from this point forward you must specifically allow
59234c
# particular features to be enabled - so if something's not working as
59234c
# you might expect, make sure that you have specifically enabled it
59234c
# below.
59234c
#
59234c
59234c
#
59234c
# DocumentRoot: The directory out of which you will serve your
59234c
# documents. By default, all requests are taken from this directory, but
59234c
# symbolic links and aliases may be used to point to other locations.
59234c
#
59234c
DocumentRoot "/var/www/html"
59234c
59234c
#
59234c
# Relax access to content within /var/www.
59234c
#
59234c
<Directory "/var/www">
59234c
    AllowOverride None
59234c
    # Allow open access:
59234c
    Require all granted
59234c
</Directory>
59234c
59234c
# Further relax access to the default document root:
59234c
<Directory "/var/www/html">
59234c
    #
59234c
    # Possible values for the Options directive are "None", "All",
59234c
    # or any combination of:
59234c
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
59234c
    #
59234c
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
59234c
    # doesn't give it to you.
59234c
    #
59234c
    # The Options directive is both complicated and important.  Please see
59234c
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
59234c
    # for more information.
59234c
    #
59234c
    Options Indexes FollowSymLinks
59234c
59234c
    #
59234c
    # AllowOverride controls what directives may be placed in .htaccess files.
59234c
    # It can be "All", "None", or any combination of the keywords:
59234c
    #   Options FileInfo AuthConfig Limit
59234c
    #
59234c
    AllowOverride None
59234c
59234c
    #
59234c
    # Controls who can get stuff from this server.
59234c
    #
59234c
    Require all granted
59234c
</Directory>
59234c
59234c
#
59234c
# DirectoryIndex: sets the file that Apache will serve if a directory
59234c
# is requested.
59234c
#
59234c
<IfModule dir_module>
59234c
    DirectoryIndex index.html
59234c
</IfModule>
59234c
59234c
#
59234c
# The following lines prevent .htaccess and .htpasswd files from being 
59234c
# viewed by Web clients. 
59234c
#
59234c
<Files ".ht*">
59234c
    Require all denied
59234c
</Files>
59234c
59234c
#
59234c
# ErrorLog: The location of the error log file.
59234c
# If you do not specify an ErrorLog directive within a <VirtualHost>
59234c
# container, error messages relating to that virtual host will be
59234c
# logged here.  If you *do* define an error logfile for a <VirtualHost>
59234c
# container, that host's errors will be logged there and not here.
59234c
#
59234c
ErrorLog "logs/error_log"
59234c
59234c
#
59234c
# LogLevel: Control the number of messages logged to the error_log.
59234c
# Possible values include: debug, info, notice, warn, error, crit,
59234c
# alert, emerg.
59234c
#
59234c
LogLevel warn
59234c
59234c
<IfModule log_config_module>
59234c
    #
59234c
    # The following directives define some format nicknames for use with
59234c
    # a CustomLog directive (see below).
59234c
    #
59234c
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
59234c
    LogFormat "%h %l %u %t \"%r\" %>s %b" common
59234c
59234c
    <IfModule logio_module>
59234c
      # You need to enable mod_logio.c to use %I and %O
59234c
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
59234c
    </IfModule>
59234c
59234c
    #
59234c
    # The location and format of the access logfile (Common Logfile Format).
59234c
    # If you do not define any access logfiles within a <VirtualHost>
59234c
    # container, they will be logged here.  Contrariwise, if you *do*
59234c
    # define per-<VirtualHost> access logfiles, transactions will be
59234c
    # logged therein and *not* in this file.
59234c
    #
59234c
    #CustomLog "logs/access_log" common
59234c
59234c
    #
59234c
    # If you prefer a logfile with access, agent, and referer information
59234c
    # (Combined Logfile Format) you can use the following directive.
59234c
    #
59234c
    CustomLog "logs/access_log" combined
59234c
</IfModule>
59234c
59234c
<IfModule alias_module>
59234c
    #
59234c
    # Redirect: Allows you to tell clients about documents that used to 
59234c
    # exist in your server's namespace, but do not anymore. The client 
59234c
    # will make a new request for the document at its new location.
59234c
    # Example:
59234c
    # Redirect permanent /foo http://www.example.com/bar
59234c
59234c
    #
59234c
    # Alias: Maps web paths into filesystem paths and is used to
59234c
    # access content that does not live under the DocumentRoot.
59234c
    # Example:
59234c
    # Alias /webpath /full/filesystem/path
59234c
    #
59234c
    # If you include a trailing / on /webpath then the server will
59234c
    # require it to be present in the URL.  You will also likely
59234c
    # need to provide a <Directory> section to allow access to
59234c
    # the filesystem path.
59234c
59234c
    #
59234c
    # ScriptAlias: This controls which directories contain server scripts. 
59234c
    # ScriptAliases are essentially the same as Aliases, except that
59234c
    # documents in the target directory are treated as applications and
59234c
    # run by the server when requested rather than as documents sent to the
59234c
    # client.  The same rules about trailing "/" apply to ScriptAlias
59234c
    # directives as to Alias.
59234c
    #
59234c
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
59234c
59234c
</IfModule>
59234c
59234c
#
59234c
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
59234c
# CGI directory exists, if you have that configured.
59234c
#
59234c
<Directory "/var/www/cgi-bin">
59234c
    AllowOverride None
59234c
    Options None
59234c
    Require all granted
59234c
</Directory>
59234c
59234c
<IfModule mime_module>
59234c
    #
59234c
    # TypesConfig points to the file containing the list of mappings from
59234c
    # filename extension to MIME-type.
59234c
    #
59234c
    TypesConfig /etc/mime.types
59234c
59234c
    #
59234c
    # AddType allows you to add to or override the MIME configuration
59234c
    # file specified in TypesConfig for specific file types.
59234c
    #
59234c
    #AddType application/x-gzip .tgz
59234c
    #
59234c
    # AddEncoding allows you to have certain browsers uncompress
59234c
    # information on the fly. Note: Not all browsers support this.
59234c
    #
59234c
    #AddEncoding x-compress .Z
59234c
    #AddEncoding x-gzip .gz .tgz
59234c
    #
59234c
    # If the AddEncoding directives above are commented-out, then you
59234c
    # probably should define those extensions to indicate media types:
59234c
    #
59234c
    AddType application/x-compress .Z
59234c
    AddType application/x-gzip .gz .tgz
59234c
59234c
    #
59234c
    # AddHandler allows you to map certain file extensions to "handlers":
59234c
    # actions unrelated to filetype. These can be either built into the server
59234c
    # or added with the Action directive (see below)
59234c
    #
59234c
    # To use CGI scripts outside of ScriptAliased directories:
59234c
    # (You will also need to add "ExecCGI" to the "Options" directive.)
59234c
    #
59234c
    #AddHandler cgi-script .cgi
59234c
59234c
    # For type maps (negotiated resources):
59234c
    #AddHandler type-map var
59234c
59234c
    #
59234c
    # Filters allow you to process content before it is sent to the client.
59234c
    #
59234c
    # To parse .shtml files for server-side includes (SSI):
59234c
    # (You will also need to add "Includes" to the "Options" directive.)
59234c
    #
59234c
    AddType text/html .shtml
59234c
    AddOutputFilter INCLUDES .shtml
59234c
</IfModule>
59234c
59234c
#
59234c
# Specify a default charset for all content served; this enables
59234c
# interpretation of all content as UTF-8 by default.  To use the 
59234c
# default browser choice (ISO-8859-1), or to allow the META tags
59234c
# in HTML content to override this choice, comment out this
59234c
# directive:
59234c
#
59234c
AddDefaultCharset UTF-8
59234c
59234c
<IfModule mime_magic_module>
59234c
    #
59234c
    # The mod_mime_magic module allows the server to use various hints from the
59234c
    # contents of the file itself to determine its type.  The MIMEMagicFile
59234c
    # directive tells the module where the hint definitions are located.
59234c
    #
59234c
    MIMEMagicFile conf/magic
59234c
</IfModule>
59234c
59234c
#
59234c
# Customizable error responses come in three flavors:
59234c
# 1) plain text 2) local redirects 3) external redirects
59234c
#
59234c
# Some examples:
59234c
#ErrorDocument 500 "The server made a boo boo."
59234c
#ErrorDocument 404 /missing.html
59234c
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
59234c
#ErrorDocument 402 http://www.example.com/subscription_info.html
59234c
#
59234c
59234c
#
59234c
# EnableMMAP and EnableSendfile: On systems that support it, 
59234c
# memory-mapping or the sendfile syscall may be used to deliver
59234c
# files.  This usually improves server performance, but must
59234c
# be turned off when serving from networked-mounted 
59234c
# filesystems or if support for these functions is otherwise
59234c
# broken on your system.
59234c
# Defaults if commented: EnableMMAP On, EnableSendfile Off
59234c
#
59234c
#EnableMMAP off
59234c
EnableSendfile on
59234c
59234c
# Supplemental configuration
59234c
#
59234c
# Load config files in the "/etc/httpd/conf.d" directory, if any.
59234c
IncludeOptional conf.d/*.conf