arrfab / rpms / httpd

Forked from rpms/httpd 5 years ago
Clone

Blame SOURCES/httpd.conf

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