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