1# 2# This is the main Apache HTTP server configuration file. It contains the 3# configuration directives that give the server its instructions. 4# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information. 5# In particular, see 6# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html> 7# for a discussion of each configuration directive. 8# 9# Do NOT simply read the instructions in here without understanding 10# what they do. They're here only as hints or reminders. If you are unsure 11# consult the online docs. You have been warned. 12# 13# Configuration and logfile names: If the filenames you specify for many 14# of the server's control files begin with "/" (or "drive:/" for Win32), the 15# server will use that explicit path. If the filenames do *not* begin 16# with "/", the value of ServerRoot is prepended -- so "logs/access_log" 17# with ServerRoot set to "/usr/local/apache2" will be interpreted by the 18# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 19# will be interpreted as '/logs/access_log'. 20 21# 22# ServerRoot: The top of the directory tree under which the server's 23# configuration, error, and log files are kept. 24# 25# Do not add a slash at the end of the directory path. If you point 26# ServerRoot at a non-local disk, be sure to specify a local disk on the 27# Mutex directive, if file-based mutexes are used. If you wish to share the 28# same ServerRoot for multiple httpd daemons, you will need to change at 29# least PidFile. 30# 31ServerRoot "@@ServerRoot@@" 32 33# 34# Mutex: Allows you to set the mutex mechanism and mutex file directory 35# for individual mutexes, or change the global defaults 36# 37# Uncomment and change the directory if mutexes are file-based and the default 38# mutex file directory is not on a local disk or is not appropriate for some 39# other reason. 40# 41# Mutex default:@rel_runtimedir@ 42 43# 44# Listen: Allows you to bind Apache to specific IP addresses and/or 45# ports, instead of the default. See also the <VirtualHost> 46# directive. 47# 48# Change this to Listen on specific IP addresses as shown below to 49# prevent Apache from glomming onto all bound IP addresses. 50# 51#Listen 12.34.56.78:80 52Listen @@Port@@ 53 54# 55# Dynamic Shared Object (DSO) Support 56# 57# To be able to use the functionality of a module which was built as a DSO you 58# have to place corresponding `LoadModule' lines at this location so the 59# directives contained in it are actually available _before_ they are used. 60# Statically compiled modules (those listed by `httpd -l') do not need 61# to be loaded here. 62# 63# Example: 64# LoadModule foo_module modules/mod_foo.so 65# 66@@LoadModule@@ 67 68<IfModule unixd_module> 69# 70# If you wish httpd to run as a different user or group, you must run 71# httpd as root initially and it will switch. 72# 73# User/Group: The name (or #number) of the user/group to run httpd as. 74# It is usually good practice to create a dedicated user and group for 75# running httpd, as with most system services. 76# 77User daemon 78Group daemon 79 80</IfModule> 81 82# 'Main' server configuration 83# 84# The directives in this section set up the values used by the 'main' 85# server, which responds to any requests that aren't handled by a 86# <VirtualHost> definition. These values also provide defaults for 87# any <VirtualHost> containers you may define later in the file. 88# 89# All of these directives may appear inside <VirtualHost> containers, 90# in which case these default settings will be overridden for the 91# virtual host being defined. 92# 93 94# 95# ServerAdmin: Your address, where problems with the server should be 96# e-mailed. This address appears on some server-generated pages, such 97# as error documents. e.g. admin@your-domain.com 98# 99ServerAdmin you@example.com 100 101# 102# ServerName gives the name and port that the server uses to identify itself. 103# This can often be determined automatically, but we recommend you specify 104# it explicitly to prevent problems during startup. 105# 106# If your host doesn't have a registered DNS name, enter its IP address here. 107# 108#ServerName www.example.com:@@Port@@ 109 110# 111# Deny access to the entirety of your server's filesystem. You must 112# explicitly permit access to web content directories in other 113# <Directory> blocks below. 114# 115<Directory /> 116 AllowOverride none 117 Require all denied 118</Directory> 119 120# 121# Note that from this point forward you must specifically allow 122# particular features to be enabled - so if something's not working as 123# you might expect, make sure that you have specifically enabled it 124# below. 125# 126 127# 128# DocumentRoot: The directory out of which you will serve your 129# documents. By default, all requests are taken from this directory, but 130# symbolic links and aliases may be used to point to other locations. 131# 132DocumentRoot "@exp_htdocsdir@" 133<Directory "@exp_htdocsdir@"> 134 # 135 # Possible values for the Options directive are "None", "All", 136 # or any combination of: 137 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 138 # 139 # Note that "MultiViews" must be named *explicitly* --- "Options All" 140 # doesn't give it to you. 141 # 142 # The Options directive is both complicated and important. Please see 143 # http://httpd.apache.org/docs/2.4/mod/core.html#options 144 # for more information. 145 # 146 Options Indexes FollowSymLinks 147 148 # 149 # AllowOverride controls what directives may be placed in .htaccess files. 150 # It can be "All", "None", or any combination of the keywords: 151 # AllowOverride FileInfo AuthConfig Limit 152 # 153 AllowOverride None 154 155 # 156 # Controls who can get stuff from this server. 157 # 158 Require all granted 159</Directory> 160 161# 162# DirectoryIndex: sets the file that Apache will serve if a directory 163# is requested. 164# 165<IfModule dir_module> 166 DirectoryIndex index.html 167</IfModule> 168 169# 170# The following lines prevent .htaccess and .htpasswd files from being 171# viewed by Web clients. 172# 173<FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])"> 174 Require all denied 175</FilesMatch> 176 177# 178# Apple specific filesystem protection. 179# 180<Files "rsrc"> 181 Require all denied 182</Files> 183<DirectoryMatch ".*\.\.namedfork"> 184 Require all denied 185</DirectoryMatch> 186 187# 188# ErrorLog: The location of the error log file. 189# If you do not specify an ErrorLog directive within a <VirtualHost> 190# container, error messages relating to that virtual host will be 191# logged here. If you *do* define an error logfile for a <VirtualHost> 192# container, that host's errors will be logged there and not here. 193# 194ErrorLog "@rel_logfiledir@/error_log" 195 196# 197# LogLevel: Control the number of messages logged to the error_log. 198# Possible values include: debug, info, notice, warn, error, crit, 199# alert, emerg. 200# 201LogLevel warn 202 203<IfModule log_config_module> 204 # 205 # The following directives define some format nicknames for use with 206 # a CustomLog directive (see below). 207 # 208 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined 209 LogFormat "%h %l %u %t \"%r\" %>s %b" common 210 211 <IfModule logio_module> 212 # You need to enable mod_logio.c to use %I and %O 213 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio 214 </IfModule> 215 216 # 217 # The location and format of the access logfile (Common Logfile Format). 218 # If you do not define any access logfiles within a <VirtualHost> 219 # container, they will be logged here. Contrariwise, if you *do* 220 # define per-<VirtualHost> access logfiles, transactions will be 221 # logged therein and *not* in this file. 222 # 223 CustomLog "@rel_logfiledir@/access_log" common 224 225 # 226 # If you prefer a logfile with access, agent, and referer information 227 # (Combined Logfile Format) you can use the following directive. 228 # 229 #CustomLog "@rel_logfiledir@/access_log" combined 230</IfModule> 231 232<IfModule alias_module> 233 # 234 # Redirect: Allows you to tell clients about documents that used to 235 # exist in your server's namespace, but do not anymore. The client 236 # will make a new request for the document at its new location. 237 # Example: 238 # Redirect permanent /foo http://www.example.com/bar 239 240 # 241 # Alias: Maps web paths into filesystem paths and is used to 242 # access content that does not live under the DocumentRoot. 243 # Example: 244 # Alias /webpath /full/filesystem/path 245 # 246 # If you include a trailing / on /webpath then the server will 247 # require it to be present in the URL. You will also likely 248 # need to provide a <Directory> section to allow access to 249 # the filesystem path. 250 251 # 252 # ScriptAlias: This controls which directories contain server scripts. 253 # ScriptAliases are essentially the same as Aliases, except that 254 # documents in the target directory are treated as applications and 255 # run by the server when requested rather than as documents sent to the 256 # client. The same rules about trailing "/" apply to ScriptAlias 257 # directives as to Alias. 258 # 259 ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "@exp_cgidir@/$1" 260 261</IfModule> 262 263<IfModule cgid_module> 264 # 265 # ScriptSock: On threaded servers, designate the path to the UNIX 266 # socket used to communicate with the CGI daemon of mod_cgid. 267 # 268 #Scriptsock cgisock 269</IfModule> 270 271# 272# "@exp_cgidir@" should be changed to whatever your ScriptAliased 273# CGI directory exists, if you have that configured. 274# 275<Directory "@exp_cgidir@"> 276 AllowOverride None 277 Options None 278 Require all granted 279</Directory> 280 281<IfModule mime_module> 282 # 283 # TypesConfig points to the file containing the list of mappings from 284 # filename extension to MIME-type. 285 # 286 TypesConfig @rel_sysconfdir@/mime.types 287 288 # 289 # AddType allows you to add to or override the MIME configuration 290 # file specified in TypesConfig for specific file types. 291 # 292 #AddType application/x-gzip .tgz 293 # 294 # AddEncoding allows you to have certain browsers uncompress 295 # information on the fly. Note: Not all browsers support this. 296 # 297 #AddEncoding x-compress .Z 298 #AddEncoding x-gzip .gz .tgz 299 # 300 # If the AddEncoding directives above are commented-out, then you 301 # probably should define those extensions to indicate media types: 302 # 303 AddType application/x-compress .Z 304 AddType application/x-gzip .gz .tgz 305 306 # 307 # AddHandler allows you to map certain file extensions to "handlers": 308 # actions unrelated to filetype. These can be either built into the server 309 # or added with the Action directive (see below) 310 # 311 # To use CGI scripts outside of ScriptAliased directories: 312 # (You will also need to add "ExecCGI" to the "Options" directive.) 313 # 314 #AddHandler cgi-script .cgi 315 316 # For type maps (negotiated resources): 317 #AddHandler type-map var 318 319 # 320 # Filters allow you to process content before it is sent to the client. 321 # 322 # To parse .shtml files for server-side includes (SSI): 323 # (You will also need to add "Includes" to the "Options" directive.) 324 # 325 #AddType text/html .shtml 326 #AddOutputFilter INCLUDES .shtml 327</IfModule> 328 329# 330# The mod_mime_magic module allows the server to use various hints from the 331# contents of the file itself to determine its type. The MIMEMagicFile 332# directive tells the module where the hint definitions are located. 333# 334#MIMEMagicFile @rel_sysconfdir@/magic 335 336# 337# Customizable error responses come in three flavors: 338# 1) plain text 2) local redirects 3) external redirects 339# 340# Some examples: 341#ErrorDocument 500 "The server made a boo boo." 342#ErrorDocument 404 /missing.html 343#ErrorDocument 404 "/cgi-bin/missing_handler.pl" 344#ErrorDocument 402 http://www.example.com/subscription_info.html 345# 346 347# 348# MaxRanges: Maximum number of Ranges in a request before 349# returning the entire resource, or one of the special 350# values 'default', 'none' or 'unlimited'. 351# Default setting is to accept 200 Ranges. 352#MaxRanges unlimited 353 354# 355# EnableMMAP and EnableSendfile: On systems that support it, 356# memory-mapping or the sendfile syscall may be used to deliver 357# files. This usually improves server performance, but must 358# be turned off when serving from networked-mounted 359# filesystems or if support for these functions is otherwise 360# broken on your system. 361# Defaults: EnableMMAP On, EnableSendfile Off 362# 363#EnableMMAP off 364#EnableSendfile on 365 366# Supplemental configuration 367# 368# The configuration files in the @rel_sysconfdir@/extra/ directory can be 369# included to add extra features or to modify the default configuration of 370# the server, or you may simply copy their contents here and change as 371# necessary. 372 373# Server-pool management (MPM specific) 374#Include @rel_sysconfdir@/extra/httpd-mpm.conf 375 376# Multi-language error messages 377#Include @rel_sysconfdir@/extra/httpd-multilang-errordoc.conf 378 379# Fancy directory listings 380#Include @rel_sysconfdir@/extra/httpd-autoindex.conf 381 382# Language settings 383#Include @rel_sysconfdir@/extra/httpd-languages.conf 384 385# User home directories 386#Include @rel_sysconfdir@/extra/httpd-userdir.conf 387 388# Real-time info on requests and configuration 389#Include @rel_sysconfdir@/extra/httpd-info.conf 390 391# Virtual hosts 392#Include @rel_sysconfdir@/extra/httpd-vhosts.conf 393 394# Local access to the Apache HTTP Server Manual 395#Include @rel_sysconfdir@/extra/httpd-manual.conf 396 397# Distributed authoring and versioning (WebDAV) 398#Include @rel_sysconfdir@/extra/httpd-dav.conf 399 400# Various default settings 401#Include @rel_sysconfdir@/extra/httpd-default.conf 402 403# Configure mod_proxy_html to understand HTML4/XHTML1 404<IfModule proxy_html_module> 405Include @rel_sysconfdir@/extra/proxy-html.conf 406</IfModule> 407 408# Secure (SSL/TLS) connections 409#Include @rel_sysconfdir@/extra/httpd-ssl.conf 410# 411# Note: The following must must be present to support 412# starting without SSL on platforms with no /dev/random equivalent 413# but a statically compiled-in mod_ssl. 414# 415<IfModule ssl_module> 416SSLRandomSeed startup builtin 417SSLRandomSeed connect builtin 418</IfModule> 419# 420# uncomment out the below to deal with user agents that deliberately 421# violate open standards by misusing DNT (DNT *must* be a specific 422# end-user choice) 423# 424#<IfModule setenvif_module> 425#BrowserMatch "MSIE 10.0;" bad_DNT 426#</IfModule> 427#<IfModule headers_module> 428#RequestHeader unset DNT env=bad_DNT 429#</IfModule> 430 431