|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
# configuration, error, and log files are kept.
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# least PidFile.
|
|
 |
28b219 |
#
|
|
 |
28b219 |
ServerRoot "/etc/httpd"
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
# Listen: Allows you to bind Apache to specific IP addresses and/or
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# Statically compiled modules (those listed by `httpd -l') do not need
|
|
 |
28b219 |
# to be loaded here.
|
|
 |
28b219 |
#
|
|
 |
28b219 |
# Example:
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
Include conf.modules.d
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
# User/Group: The name (or
|
|
 |
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 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# as error documents. e.g. admin@your-domain.com
|
|
 |
28b219 |
#
|
|
 |
28b219 |
ServerAdmin root@localhost
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# it explicitly to prevent problems during startup.
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
#ServerName www.example.com:80
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
# particular features to be enabled - so if something's not working as
|
|
 |
28b219 |
|
|
 |
28b219 |
# below.
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
Require all granted
|
|
 |
28b219 |
</Directory>
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
<Directory "/var/www/html">
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# Note that "MultiViews" must be named *explicitly* --- "Options All"
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# http:
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
Options Indexes FollowSymLinks
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# It can be "All", "None", or any combination of the keywords:
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
AllowOverride None
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
Require all granted
|
|
 |
28b219 |
</Directory>
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
ErrorLog "logs/error_log"
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
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 |
|
|
 |
28b219 |
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
|
 |
28b219 |
</IfModule>
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
CustomLog "logs/access_log" combined
|
|
 |
28b219 |
</IfModule>
|
|
 |
28b219 |
|
|
 |
28b219 |
<IfModule alias_module>
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# client. The same rules about trailing "/" apply to ScriptAlias
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
|
 |
28b219 |
|
|
 |
28b219 |
</IfModule>
|
|
 |
28b219 |
|
|
 |
28b219 |
#
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
TypesConfig /etc/mime.types
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# file specified in TypesConfig for specific file types.
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
#AddEncoding x-compress .Z
|
|
 |
28b219 |
#AddEncoding x-gzip .gz .tgz
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
AddType application/x-compress .Z
|
|
 |
28b219 |
AddType application/x-gzip .gz .tgz
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
#AddHandler cgi-script .cgi
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
|
|
 |
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 |
|
|
 |
28b219 |
|
|
 |
28b219 |
# be turned off when serving from networked-mounted
|
|
 |
28b219 |
# filesystems or if support for these functions is otherwise
|
|
 |
28b219 |
|
|
 |
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
|