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