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