2310N/A#
2310N/A# This is the main Apache HTTP server configuration file. It contains the
2310N/A# configuration directives that give the server its instructions.
3237N/A# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
2310N/A# In particular, see
3237N/A# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
2310N/A# for a discussion of each configuration directive.
2310N/A#
3237N/A# Solaris Quick Configuration Information
3237N/A#
3237N/A# 1. Set ServerName if necessary (default is 127.0.0.1)
3237N/A# 2. Set ServerAdmin to a valid email address
3237N/A#
3237N/A#
2310N/A# Do NOT simply read the instructions in here without understanding
2310N/A# what they do. They're here only as hints or reminders. If you are unsure
2310N/A# consult the online docs. You have been warned.
2310N/A#
2310N/A# Configuration and logfile names: If the filenames you specify for many
2310N/A# of the server's control files begin with "/" (or "drive:/" for Win32), the
2310N/A# server will use that explicit path. If the filenames do *not* begin
3237N/A# with "/", the value of ServerRoot is prepended -- so "logs/access_log"
3237N/A# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
3237N/A# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
3237N/A# will be interpreted as '/logs/access_log'.
2310N/A
2310N/A#
2310N/A# ServerRoot: The top of the directory tree under which the server's
2310N/A# configuration, error, and log files are kept.
2310N/A#
2310N/A# Do not add a slash at the end of the directory path. If you point
3237N/A# ServerRoot at a non-local disk, be sure to specify a local disk on the
3237N/A# Mutex directive, if file-based mutexes are used. If you wish to share the
3237N/A# same ServerRoot for multiple httpd daemons, you will need to change at
3237N/A# least PidFile.
2310N/A#
3237N/AServerRoot "/usr/apache2/2.4"
2310N/A
2310N/A#
2310N/A# Listen: Allows you to bind Apache to specific IP addresses and/or
2310N/A# ports, instead of the default. See also the <VirtualHost>
2310N/A# directive.
2310N/A#
2310N/A# Change this to Listen on specific IP addresses as shown below to
2310N/A# prevent Apache from glomming onto all bound IP addresses.
2310N/A#
2310N/A#Listen 12.34.56.78:80
2310N/AListen 80
2310N/A
2310N/A#
2310N/A# Dynamic Shared Object (DSO) Support
2310N/A#
2310N/A# To be able to use the functionality of a module which was built as a DSO you
3237N/A# have to place corresponding `LoadModule' lines at this location so the
3237N/A# directives contained in it are actually available _before_ they are used.
3237N/A# Statically compiled modules (those listed by `httpd -l') do not need
3237N/A# to be loaded here.
3237N/A#
3237N/A# Example:
3237N/A# LoadModule foo_module modules/mod_foo.so
3237N/A#
3237N/A# Note that mod_authn_dbd.so, mod_authz_dbd.so, mod_dbd.so and
3237N/A# mod_session_dbd.so are bundled in separate package "apache-dbd".
3237N/A# Similarly mod_authnz_ldap.so and mod_ldap.so are bundled in
3237N/A# separate package "apache-ldap".
3237N/A# Also mediated symbolic link mod_ssl.so pointing to mod_ssl-default.so
3237N/A# or mod_ssl-fips-140.so is bundled in separate package "apache-ssl"
3237N/A# respectively "apache-ssl-fips-140" package.
3237N/A# And finally mod_lua.so is bundled in separate package "apache-lua".
2310N/A#
3237N/ALoadModule access_compat_module libexec/mod_access_compat.so
3237N/ALoadModule alias_module libexec/mod_alias.so
3237N/ALoadModule authn_core_module libexec/mod_authn_core.so
3237N/ALoadModule authz_core_module libexec/mod_authz_core.so
3237N/ALoadModule authz_host_module libexec/mod_authz_host.so
3237N/ALoadModule cache_module libexec/mod_cache.so
3237N/ALoadModule cache_disk_module libexec/mod_cache_disk.so
3237N/ALoadModule cache_socache_module libexec/mod_cache_socache.so
3237N/ALoadModule dir_module libexec/mod_dir.so
3237N/ALoadModule env_module libexec/mod_env.so
3237N/ALoadModule log_config_module libexec/mod_log_config.so
3237N/ALoadModule mime_module libexec/mod_mime.so
3237N/ALoadModule mpm_worker_module libexec/mod_mpm_worker.so
3237N/ALoadModule proxy_module libexec/mod_proxy.so
3237N/ALoadModule proxy_connect_module libexec/mod_proxy_connect.so
3237N/ALoadModule proxy_http_module libexec/mod_proxy_http.so
3237N/ALoadModule rewrite_module libexec/mod_rewrite.so
3237N/ALoadModule ssl_module libexec/mod_ssl.so
3237N/ALoadModule socache_memcache_module libexec/mod_socache_memcache.so
3237N/ALoadModule unixd_module libexec/mod_unixd.so
3237N/ALoadModule authn_file_module libexec/mod_authn_file.so
2310N/A
3237N/A<IfModule unixd_module>
2310N/A#
2310N/A# If you wish httpd to run as a different user or group, you must run
2310N/A# httpd as root initially and it will switch.
2310N/A#
2310N/A# User/Group: The name (or #number) of the user/group to run httpd as.
2310N/A# It is usually good practice to create a dedicated user and group for
2310N/A# running httpd, as with most system services.
2310N/A#
2310N/AUser daemon
2310N/AGroup daemon
2310N/A
2310N/A</IfModule>
2310N/A
2310N/A# 'Main' server configuration
2310N/A#
2310N/A# The directives in this section set up the values used by the 'main'
2310N/A# server, which responds to any requests that aren't handled by a
2310N/A# <VirtualHost> definition. These values also provide defaults for
2310N/A# any <VirtualHost> containers you may define later in the file.
2310N/A#
2310N/A# All of these directives may appear inside <VirtualHost> containers,
2310N/A# in which case these default settings will be overridden for the
2310N/A# virtual host being defined.
2310N/A#
2310N/A
2310N/A#
2310N/A# ServerAdmin: Your address, where problems with the server should be
2310N/A# e-mailed. This address appears on some server-generated pages, such
2310N/A# as error documents. e.g. admin@your-domain.com
2310N/A#
2310N/AServerAdmin you@example.com
2310N/A
2310N/A#
2310N/A# ServerName gives the name and port that the server uses to identify itself.
2310N/A# This can often be determined automatically, but we recommend you specify
2310N/A# it explicitly to prevent problems during startup.
2310N/A#
2310N/A# If your host doesn't have a registered DNS name, enter its IP address here.
2310N/A#
3237N/A#Servername www.example.com:80
2310N/A
2310N/A#
3237N/A# Deny access to the entirety of your server's filesystem. You must
3237N/A# explicitly permit access to web content directories in other
3237N/A# <Directory> blocks below.
2310N/A#
2310N/A<Directory />
3237N/A AllowOverride none
3237N/A Require all denied
2310N/A</Directory>
2310N/A
2310N/A#
2310N/A# Note that from this point forward you must specifically allow
2310N/A# particular features to be enabled - so if something's not working as
2310N/A# you might expect, make sure that you have specifically enabled it
2310N/A# below.
2310N/A#
2310N/A
2310N/A#
3237N/A# DocumentRoot: The directory out of which you will serve your
3237N/A# documents. By default, all requests are taken from this directory, but
3237N/A# symbolic links and aliases may be used to point to other locations.
2310N/A#
3237N/ADocumentRoot "/var/apache2/2.4/htdocs"
3237N/A<Directory "/var/apache2/2.4/htdocs">
2310N/A #
2310N/A # Possible values for the Options directive are "None", "All",
2310N/A # or any combination of:
2310N/A # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
2310N/A #
2310N/A # Note that "MultiViews" must be named *explicitly* --- "Options All"
2310N/A # doesn't give it to you.
2310N/A #
2310N/A # The Options directive is both complicated and important. Please see
3237N/A # http://httpd.apache.org/docs/2.4/mod/core.html#options
2310N/A # for more information.
2310N/A #
2310N/A Options Indexes FollowSymLinks
2310N/A
2310N/A #
2310N/A # AllowOverride controls what directives may be placed in .htaccess files.
2310N/A # It can be "All", "None", or any combination of the keywords:
2310N/A # Options FileInfo AuthConfig Limit
2310N/A #
2310N/A AllowOverride None
2310N/A
2310N/A #
2310N/A # Controls who can get stuff from this server.
2310N/A #
3237N/A Require all granted
2310N/A</Directory>
2310N/A
2310N/A#
2310N/A# DirectoryIndex: sets the file that Apache will serve if a directory
2310N/A# is requested.
2310N/A#
2310N/A<IfModule dir_module>
2310N/A DirectoryIndex index.html
2310N/A</IfModule>
2310N/A
2310N/A#
2310N/A# The following lines prevent .htaccess and .htpasswd files from being
2310N/A# viewed by Web clients.
2310N/A#
3237N/A<Files ".ht*">
3237N/A Require all denied
3237N/A</Files>
2310N/A
2310N/A#
2310N/A# ErrorLog: The location of the error log file.
2310N/A# If you do not specify an ErrorLog directive within a <VirtualHost>
2310N/A# container, error messages relating to that virtual host will be
2310N/A# logged here. If you *do* define an error logfile for a <VirtualHost>
2310N/A# container, that host's errors will be logged there and not here.
2310N/A#
3237N/AErrorLog "/var/apache2/2.4/logs/error_log"
2310N/A
2310N/A#
2310N/A# LogLevel: Control the number of messages logged to the error_log.
2310N/A# Possible values include: debug, info, notice, warn, error, crit,
2310N/A# alert, emerg.
2310N/A#
2310N/ALogLevel warn
2310N/A
2310N/A<IfModule log_config_module>
2310N/A #
2310N/A # The following directives define some format nicknames for use with
2310N/A # a CustomLog directive (see below).
2310N/A #
2310N/A LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
2310N/A LogFormat "%h %l %u %t \"%r\" %>s %b" common
2310N/A
2310N/A <IfModule logio_module>
2310N/A # You need to enable mod_logio.c to use %I and %O
2310N/A LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
2310N/A </IfModule>
2310N/A
2310N/A #
2310N/A # The location and format of the access logfile (Common Logfile Format).
2310N/A # If you do not define any access logfiles within a <VirtualHost>
2310N/A # container, they will be logged here. Contrariwise, if you *do*
2310N/A # define per-<VirtualHost> access logfiles, transactions will be
2310N/A # logged therein and *not* in this file.
2310N/A #
3237N/A CustomLog "/var/apache2/2.4/logs/access_log" common
2310N/A
2310N/A #
2310N/A # If you prefer a logfile with access, agent, and referer information
2310N/A # (Combined Logfile Format) you can use the following directive.
2310N/A #
3237N/A #CustomLog "/var/apache2/2.4/logs/access_log" combined
2310N/A</IfModule>
2310N/A
2310N/A<IfModule alias_module>
2310N/A #
2310N/A # Redirect: Allows you to tell clients about documents that used to
2310N/A # exist in your server's namespace, but do not anymore. The client
2310N/A # will make a new request for the document at its new location.
2310N/A # Example:
2310N/A # Redirect permanent /foo http://www.example.com/bar
2310N/A
2310N/A #
2310N/A # Alias: Maps web paths into filesystem paths and is used to
2310N/A # access content that does not live under the DocumentRoot.
2310N/A # Example:
2310N/A # Alias /webpath /full/filesystem/path
2310N/A #
2310N/A # If you include a trailing / on /webpath then the server will
2310N/A # require it to be present in the URL. You will also likely
2310N/A # need to provide a <Directory> section to allow access to
2310N/A # the filesystem path.
2310N/A
2310N/A #
2310N/A # ScriptAlias: This controls which directories contain server scripts.
2310N/A # ScriptAliases are essentially the same as Aliases, except that
2310N/A # documents in the target directory are treated as applications and
2310N/A # run by the server when requested rather than as documents sent to the
2310N/A # client. The same rules about trailing "/" apply to ScriptAlias
2310N/A # directives as to Alias.
2310N/A #
3237N/A ScriptAlias /cgi-bin/ "/var/apache2/2.4/cgi-bin/"
2310N/A
2310N/A</IfModule>
2310N/A
2310N/A<IfModule cgid_module>
2310N/A #
2310N/A # ScriptSock: On threaded servers, designate the path to the UNIX
2310N/A # socket used to communicate with the CGI daemon of mod_cgid.
2310N/A #
3237N/A #Scriptsock cgisock
2310N/A</IfModule>
2310N/A
2310N/A#
3237N/A# "/var/apache2/2.4/cgi-bin" should be changed to whatever your ScriptAliased
2310N/A# CGI directory exists, if you have that configured.
2310N/A#
3237N/A<Directory "/var/apache2/2.4/cgi-bin">
2310N/A AllowOverride None
2310N/A Options None
3237N/A Require all granted
2310N/A</Directory>
2310N/A
2310N/A<IfModule mime_module>
2310N/A #
2310N/A # TypesConfig points to the file containing the list of mappings from
2310N/A # filename extension to MIME-type.
2310N/A #
3237N/A TypesConfig /etc/apache2/2.4/mime.types
2310N/A
2310N/A #
2310N/A # AddType allows you to add to or override the MIME configuration
2310N/A # file specified in TypesConfig for specific file types.
2310N/A #
2310N/A #AddType application/x-gzip .tgz
2310N/A #
2310N/A # AddEncoding allows you to have certain browsers uncompress
2310N/A # information on the fly. Note: Not all browsers support this.
2310N/A #
2310N/A #AddEncoding x-compress .Z
2310N/A #AddEncoding x-gzip .gz .tgz
2310N/A #
2310N/A # If the AddEncoding directives above are commented-out, then you
2310N/A # probably should define those extensions to indicate media types:
2310N/A #
2310N/A AddType application/x-compress .Z
2310N/A AddType application/x-gzip .gz .tgz
2310N/A
2310N/A #
2310N/A # AddHandler allows you to map certain file extensions to "handlers":
2310N/A # actions unrelated to filetype. These can be either built into the server
2310N/A # or added with the Action directive (see below)
2310N/A #
2310N/A # To use CGI scripts outside of ScriptAliased directories:
2310N/A # (You will also need to add "ExecCGI" to the "Options" directive.)
2310N/A #
2310N/A #AddHandler cgi-script .cgi
2310N/A
2310N/A # For type maps (negotiated resources):
2310N/A #AddHandler type-map var
2310N/A
2310N/A #
2310N/A # Filters allow you to process content before it is sent to the client.
2310N/A #
2310N/A # To parse .shtml files for server-side includes (SSI):
2310N/A # (You will also need to add "Includes" to the "Options" directive.)
2310N/A #
2310N/A #AddType text/html .shtml
2310N/A #AddOutputFilter INCLUDES .shtml
2310N/A
2310N/A # Add a new mime.type for .p5i file extension so that clicking on
2310N/A # this file type on a web page launches PackageManager in a Webinstall mode.
2310N/A AddType application/vnd.pkg5.info .p5i
2310N/A</IfModule>
2310N/A
2310N/A#
2310N/A# The mod_mime_magic module allows the server to use various hints from the
2310N/A# contents of the file itself to determine its type. The MIMEMagicFile
2310N/A# directive tells the module where the hint definitions are located.
2310N/A#
3237N/A#MIMEMagicFile /etc/apache2/2.4/magic
2310N/A
2310N/A#
2310N/A# Customizable error responses come in three flavors:
2310N/A# 1) plain text 2) local redirects 3) external redirects
2310N/A#
2310N/A# Some examples:
2310N/A#ErrorDocument 500 "The server made a boo boo."
2310N/A#ErrorDocument 404 /missing.html
2310N/A#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
2310N/A#ErrorDocument 402 http://www.example.com/subscription_info.html
2310N/A#
2310N/A
2310N/A#
3237N/A# MaxRanges: Maximum number of Ranges in a request before
3237N/A# returning the entire resource, or one of the special
3237N/A# values 'default', 'none' or 'unlimited'.
3237N/A# Default setting is to accept 200 Ranges.
3237N/A#MaxRanges unlimited
3237N/A
3237N/A#
2310N/A# EnableMMAP and EnableSendfile: On systems that support it,
3237N/A# memory-mapping or the sendfile syscall may be used to deliver
2310N/A# files. This usually improves server performance, but must
2310N/A# be turned off when serving from networked-mounted
2310N/A# filesystems or if support for these functions is otherwise
2310N/A# broken on your system.
3237N/A# Defaults: EnableMMAP On, EnableSendfile Off
2310N/A#
2310N/A#EnableMMAP off
3237N/A#EnableSendfile on
2310N/A
2310N/A# Supplemental configuration
2310N/A#
2310N/A# Include all the .conf configuration files in the
3237N/A# /etc/apache2/2.4/conf.d/ directory.
2310N/A#
2310N/A# You can place additional configuration files in the
3237N/A# /etc/apache2/2.4/conf.d/ directory to add extra features
2310N/A# or to modify the default configuration of the server,
2310N/A# or you may simply copy their contents here and change as
2310N/A# necessary.
2310N/A#
2310N/A# Sample configuration files are in the
3237N/A# /etc/apache2/2.4/samples-conf.d directory. To use a
3237N/A# sample .conf file, copy it to /etc/apache2/2.4/conf.d
2310N/A# directory and modify as required.
2310N/A#
3237N/AIncludeOptional /etc/apache2/2.4/conf.d/*.conf
2310N/A
2310N/A#
2310N/A# Note: The following must must be present to support
2310N/A# starting without SSL on platforms with no /dev/random equivalent
2310N/A# but a statically compiled-in mod_ssl.
2310N/A#
2310N/A<IfModule ssl_module>
2310N/ASSLRandomSeed startup builtin
2310N/ASSLRandomSeed connect builtin
2310N/A</IfModule>