Blame SOURCES/httpd.conf

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