2 # This is the main Apache HTTP server configuration file. It contains the
\r
3 # configuration directives that give the server its instructions.
\r
4 # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
\r
5 # In particular, see
\r
6 # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
\r
7 # for a discussion of each configuration directive.
\r
9 # Do NOT simply read the instructions in here without understanding
\r
10 # what they do. They're here only as hints or reminders. If you are unsure
\r
11 # consult the online docs. You have been warned.
\r
13 # Configuration and logfile names: If the filenames you specify for many
\r
14 # of the server's control files begin with "/" (or "drive:/" for Win32), the
\r
15 # server will use that explicit path. If the filenames do *not* begin
\r
16 # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
\r
17 # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
\r
18 # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
\r
19 # will be interpreted as '/logs/access_log'.
\r
22 # ServerRoot: The top of the directory tree under which the server's
\r
23 # configuration, error, and log files are kept.
\r
25 # Do not add a slash at the end of the directory path. If you point
\r
26 # ServerRoot at a non-local disk, be sure to specify a local disk on the
\r
27 # Mutex directive, if file-based mutexes are used. If you wish to share the
\r
28 # same ServerRoot for multiple httpd daemons, you will need to change at
\r
31 ServerRoot "/usr/local/apache2"
\r
34 # Mutex: Allows you to set the mutex mechanism and mutex file directory
\r
35 # for individual mutexes, or change the global defaults
\r
37 # Uncomment and change the directory if mutexes are file-based and the default
\r
38 # mutex file directory is not on a local disk or is not appropriate for some
\r
41 # Mutex default:logs
\r
44 # Listen: Allows you to bind Apache to specific IP addresses and/or
\r
45 # ports, instead of the default. See also the <VirtualHost>
\r
48 # Change this to Listen on specific IP addresses as shown below to
\r
49 # prevent Apache from glomming onto all bound IP addresses.
\r
51 #Listen 12.34.56.78:80
\r
55 # Dynamic Shared Object (DSO) Support
\r
57 # To be able to use the functionality of a module which was built as a DSO you
\r
58 # have to place corresponding `LoadModule' lines at this location so the
\r
59 # directives contained in it are actually available _before_ they are used.
\r
60 # Statically compiled modules (those listed by `httpd -l') do not need
\r
61 # to be loaded here.
\r
64 # LoadModule foo_module modules/mod_foo.so
\r
66 LoadModule mpm_event_module modules/mod_mpm_event.so
\r
67 #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
\r
68 #LoadModule mpm_worker_module modules/mod_mpm_worker.so
\r
69 LoadModule authn_file_module modules/mod_authn_file.so
\r
70 #LoadModule authn_dbm_module modules/mod_authn_dbm.so
\r
71 #LoadModule authn_anon_module modules/mod_authn_anon.so
\r
72 #LoadModule authn_dbd_module modules/mod_authn_dbd.so
\r
73 #LoadModule authn_socache_module modules/mod_authn_socache.so
\r
74 LoadModule authn_core_module modules/mod_authn_core.so
\r
75 LoadModule authz_host_module modules/mod_authz_host.so
\r
76 LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
\r
77 LoadModule authz_user_module modules/mod_authz_user.so
\r
78 #LoadModule authz_dbm_module modules/mod_authz_dbm.so
\r
79 #LoadModule authz_owner_module modules/mod_authz_owner.so
\r
80 #LoadModule authz_dbd_module modules/mod_authz_dbd.so
\r
81 LoadModule authz_core_module modules/mod_authz_core.so
\r
82 #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
\r
83 #LoadModule authnz_fcgi_module modules/mod_authnz_fcgi.so
\r
84 LoadModule access_compat_module modules/mod_access_compat.so
\r
85 LoadModule auth_basic_module modules/mod_auth_basic.so
\r
86 #LoadModule auth_form_module modules/mod_auth_form.so
\r
87 #LoadModule auth_digest_module modules/mod_auth_digest.so
\r
88 #LoadModule allowmethods_module modules/mod_allowmethods.so
\r
89 #LoadModule isapi_module modules/mod_isapi.so
\r
90 #LoadModule file_cache_module modules/mod_file_cache.so
\r
91 #LoadModule cache_module modules/mod_cache.so
\r
92 #LoadModule cache_disk_module modules/mod_cache_disk.so
\r
93 #LoadModule cache_socache_module modules/mod_cache_socache.so
\r
94 #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
\r
95 #LoadModule socache_dbm_module modules/mod_socache_dbm.so
\r
96 #LoadModule socache_memcache_module modules/mod_socache_memcache.so
\r
97 #LoadModule socache_redis_module modules/mod_socache_redis.so
\r
98 #LoadModule watchdog_module modules/mod_watchdog.so
\r
99 #LoadModule macro_module modules/mod_macro.so
\r
100 #LoadModule dbd_module modules/mod_dbd.so
\r
101 #LoadModule bucketeer_module modules/mod_bucketeer.so
\r
102 #LoadModule dumpio_module modules/mod_dumpio.so
\r
103 #LoadModule echo_module modules/mod_echo.so
\r
104 #LoadModule example_hooks_module modules/mod_example_hooks.so
\r
105 #LoadModule case_filter_module modules/mod_case_filter.so
\r
106 #LoadModule case_filter_in_module modules/mod_case_filter_in.so
\r
107 #LoadModule example_ipc_module modules/mod_example_ipc.so
\r
108 #LoadModule buffer_module modules/mod_buffer.so
\r
109 #LoadModule data_module modules/mod_data.so
\r
110 #LoadModule ratelimit_module modules/mod_ratelimit.so
\r
111 LoadModule reqtimeout_module modules/mod_reqtimeout.so
\r
112 #LoadModule ext_filter_module modules/mod_ext_filter.so
\r
113 #LoadModule request_module modules/mod_request.so
\r
114 #LoadModule include_module modules/mod_include.so
\r
115 LoadModule filter_module modules/mod_filter.so
\r
116 #LoadModule reflector_module modules/mod_reflector.so
\r
117 #LoadModule substitute_module modules/mod_substitute.so
\r
118 #LoadModule sed_module modules/mod_sed.so
\r
119 #LoadModule charset_lite_module modules/mod_charset_lite.so
\r
120 #LoadModule deflate_module modules/mod_deflate.so
\r
121 #LoadModule xml2enc_module modules/mod_xml2enc.so
\r
122 #LoadModule proxy_html_module modules/mod_proxy_html.so
\r
123 #LoadModule brotli_module modules/mod_brotli.so
\r
124 LoadModule mime_module modules/mod_mime.so
\r
125 #LoadModule ldap_module modules/mod_ldap.so
\r
126 LoadModule log_config_module modules/mod_log_config.so
\r
127 #LoadModule log_debug_module modules/mod_log_debug.so
\r
128 #LoadModule log_forensic_module modules/mod_log_forensic.so
\r
129 #LoadModule logio_module modules/mod_logio.so
\r
130 LoadModule lua_module modules/mod_lua.so
\r
131 LoadModule env_module modules/mod_env.so
\r
132 #LoadModule mime_magic_module modules/mod_mime_magic.so
\r
133 #LoadModule cern_meta_module modules/mod_cern_meta.so
\r
134 #LoadModule expires_module modules/mod_expires.so
\r
135 LoadModule headers_module modules/mod_headers.so
\r
136 #LoadModule ident_module modules/mod_ident.so
\r
137 #LoadModule usertrack_module modules/mod_usertrack.so
\r
138 #LoadModule unique_id_module modules/mod_unique_id.so
\r
139 LoadModule setenvif_module modules/mod_setenvif.so
\r
140 LoadModule version_module modules/mod_version.so
\r
141 #LoadModule remoteip_module modules/mod_remoteip.so
\r
142 #LoadModule proxy_module modules/mod_proxy.so
\r
143 #LoadModule proxy_connect_module modules/mod_proxy_connect.so
\r
144 #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
\r
145 #LoadModule proxy_http_module modules/mod_proxy_http.so
\r
146 #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
\r
147 #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
\r
148 #LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
\r
149 #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
\r
150 #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
\r
151 #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
\r
152 #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
\r
153 #LoadModule proxy_express_module modules/mod_proxy_express.so
\r
154 #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
\r
155 #LoadModule session_module modules/mod_session.so
\r
156 #LoadModule session_cookie_module modules/mod_session_cookie.so
\r
157 #LoadModule session_crypto_module modules/mod_session_crypto.so
\r
158 #LoadModule session_dbd_module modules/mod_session_dbd.so
\r
159 #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
\r
160 #LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
\r
161 #LoadModule ssl_module modules/mod_ssl.so
\r
162 #LoadModule optional_hook_export_module modules/mod_optional_hook_export.so
\r
163 #LoadModule optional_hook_import_module modules/mod_optional_hook_import.so
\r
164 #LoadModule optional_fn_import_module modules/mod_optional_fn_import.so
\r
165 #LoadModule optional_fn_export_module modules/mod_optional_fn_export.so
\r
166 #LoadModule dialup_module modules/mod_dialup.so
\r
167 #LoadModule http2_module modules/mod_http2.so
\r
168 #LoadModule proxy_http2_module modules/mod_proxy_http2.so
\r
169 #LoadModule md_module modules/mod_md.so
\r
170 #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
\r
171 #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
\r
172 #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
\r
173 #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
\r
174 LoadModule unixd_module modules/mod_unixd.so
\r
175 #LoadModule heartbeat_module modules/mod_heartbeat.so
\r
176 #LoadModule heartmonitor_module modules/mod_heartmonitor.so
\r
177 #LoadModule dav_module modules/mod_dav.so
\r
178 LoadModule status_module modules/mod_status.so
\r
179 LoadModule autoindex_module modules/mod_autoindex.so
\r
180 #LoadModule asis_module modules/mod_asis.so
\r
181 #LoadModule info_module modules/mod_info.so
\r
182 #LoadModule suexec_module modules/mod_suexec.so
\r
183 <IfModule !mpm_prefork_module>
\r
184 #LoadModule cgid_module modules/mod_cgid.so
\r
186 <IfModule mpm_prefork_module>
\r
187 #LoadModule cgi_module modules/mod_cgi.so
\r
189 #LoadModule dav_fs_module modules/mod_dav_fs.so
\r
190 #LoadModule dav_lock_module modules/mod_dav_lock.so
\r
191 #LoadModule vhost_alias_module modules/mod_vhost_alias.so
\r
192 #LoadModule negotiation_module modules/mod_negotiation.so
\r
193 LoadModule dir_module modules/mod_dir.so
\r
194 #LoadModule imagemap_module modules/mod_imagemap.so
\r
195 #LoadModule actions_module modules/mod_actions.so
\r
196 #LoadModule speling_module modules/mod_speling.so
\r
197 #LoadModule userdir_module modules/mod_userdir.so
\r
198 LoadModule alias_module modules/mod_alias.so
\r
199 #LoadModule rewrite_module modules/mod_rewrite.so
\r
201 <IfModule unixd_module>
\r
203 # If you wish httpd to run as a different user or group, you must run
\r
204 # httpd as root initially and it will switch.
\r
206 # User/Group: The name (or #number) of the user/group to run httpd as.
\r
207 # It is usually good practice to create a dedicated user and group for
\r
208 # running httpd, as with most system services.
\r
215 # 'Main' server configuration
\r
217 # The directives in this section set up the values used by the 'main'
\r
218 # server, which responds to any requests that aren't handled by a
\r
219 # <VirtualHost> definition. These values also provide defaults for
\r
220 # any <VirtualHost> containers you may define later in the file.
\r
222 # All of these directives may appear inside <VirtualHost> containers,
\r
223 # in which case these default settings will be overridden for the
\r
224 # virtual host being defined.
\r
228 # ServerAdmin: Your address, where problems with the server should be
\r
229 # e-mailed. This address appears on some server-generated pages, such
\r
230 # as error documents. e.g. admin@your-domain.com
\r
232 ServerAdmin you@example.com
\r
235 # ServerName gives the name and port that the server uses to identify itself.
\r
236 # This can often be determined automatically, but we recommend you specify
\r
237 # it explicitly to prevent problems during startup.
\r
239 # If your host doesn't have a registered DNS name, enter its IP address here.
\r
241 #ServerName www.example.com:80
\r
244 # Deny access to the entirety of your server's filesystem. You must
\r
245 # explicitly permit access to web content directories in other
\r
246 # <Directory> blocks below.
\r
254 # Note that from this point forward you must specifically allow
\r
255 # particular features to be enabled - so if something's not working as
\r
256 # you might expect, make sure that you have specifically enabled it
\r
261 # DocumentRoot: The directory out of which you will serve your
\r
262 # documents. By default, all requests are taken from this directory, but
\r
263 # symbolic links and aliases may be used to point to other locations.
\r
265 DocumentRoot "/usr/local/apache2/htdocs"
\r
266 <Directory "/usr/local/apache2/htdocs">
\r
268 # Possible values for the Options directive are "None", "All",
\r
269 # or any combination of:
\r
270 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
\r
272 # Note that "MultiViews" must be named *explicitly* --- "Options All"
\r
273 # doesn't give it to you.
\r
275 # The Options directive is both complicated and important. Please see
\r
276 # http://httpd.apache.org/docs/2.4/mod/core.html#options
\r
277 # for more information.
\r
279 Options Indexes FollowSymLinks
\r
282 # AllowOverride controls what directives may be placed in .htaccess files.
\r
283 # It can be "All", "None", or any combination of the keywords:
\r
284 # AllowOverride FileInfo AuthConfig Limit
\r
289 # Controls who can get stuff from this server.
\r
291 Require all granted
\r
295 # DirectoryIndex: sets the file that Apache will serve if a directory
\r
298 <IfModule dir_module>
\r
299 DirectoryIndex index.html
\r
303 # The following lines prevent .htaccess and .htpasswd files from being
\r
304 # viewed by Web clients.
\r
310 # run lua scripts using ".lua" extension
\r
312 SetHandler lua-script
\r
316 # ErrorLog: The location of the error log file.
\r
317 # If you do not specify an ErrorLog directive within a <VirtualHost>
\r
318 # container, error messages relating to that virtual host will be
\r
319 # logged here. If you *do* define an error logfile for a <VirtualHost>
\r
320 # container, that host's errors will be logged there and not here.
\r
322 ErrorLog /proc/self/fd/2
\r
325 # LogLevel: Control the number of messages logged to the error_log.
\r
326 # Possible values include: debug, info, notice, warn, error, crit,
\r
331 <IfModule log_config_module>
\r
333 # The following directives define some format nicknames for use with
\r
334 # a CustomLog directive (see below).
\r
336 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
\r
337 LogFormat "%h %l %u %t \"%r\" %>s %b" common
\r
339 <IfModule logio_module>
\r
340 # You need to enable mod_logio.c to use %I and %O
\r
341 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
\r
345 # The location and format of the access logfile (Common Logfile Format).
\r
346 # If you do not define any access logfiles within a <VirtualHost>
\r
347 # container, they will be logged here. Contrariwise, if you *do*
\r
348 # define per-<VirtualHost> access logfiles, transactions will be
\r
349 # logged therein and *not* in this file.
\r
351 CustomLog /proc/self/fd/1 common
\r
354 # If you prefer a logfile with access, agent, and referer information
\r
355 # (Combined Logfile Format) you can use the following directive.
\r
357 #CustomLog "logs/access_log" combined
\r
360 <IfModule alias_module>
\r
362 # Redirect: Allows you to tell clients about documents that used to
\r
363 # exist in your server's namespace, but do not anymore. The client
\r
364 # will make a new request for the document at its new location.
\r
366 # Redirect permanent /foo http://www.example.com/bar
\r
369 # Alias: Maps web paths into filesystem paths and is used to
\r
370 # access content that does not live under the DocumentRoot.
\r
372 # Alias /webpath /full/filesystem/path
\r
374 # If you include a trailing / on /webpath then the server will
\r
375 # require it to be present in the URL. You will also likely
\r
376 # need to provide a <Directory> section to allow access to
\r
377 # the filesystem path.
\r
380 # ScriptAlias: This controls which directories contain server scripts.
\r
381 # ScriptAliases are essentially the same as Aliases, except that
\r
382 # documents in the target directory are treated as applications and
\r
383 # run by the server when requested rather than as documents sent to the
\r
384 # client. The same rules about trailing "/" apply to ScriptAlias
\r
385 # directives as to Alias.
\r
387 ScriptAlias /hook/ "/usr/local/apache2/cgi-bin/"
\r
391 <IfModule cgid_module>
\r
393 # ScriptSock: On threaded servers, designate the path to the UNIX
\r
394 # socket used to communicate with the CGI daemon of mod_cgid.
\r
396 #Scriptsock cgisock
\r
400 # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
\r
401 # CGI directory exists, if you have that configured.
\r
403 <Directory "/usr/local/apache2/cgi-bin">
\r
405 Options Indexes FollowSymLinks
\r
407 Require all granted
\r
410 <IfModule headers_module>
\r
412 # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
\r
413 # backend servers which have lingering "httpoxy" defects.
\r
414 # 'Proxy' request header is undefined by the IETF, not listed by IANA
\r
416 RequestHeader unset Proxy early
\r
419 <IfModule mime_module>
\r
421 # TypesConfig points to the file containing the list of mappings from
\r
422 # filename extension to MIME-type.
\r
424 TypesConfig conf/mime.types
\r
427 # AddType allows you to add to or override the MIME configuration
\r
428 # file specified in TypesConfig for specific file types.
\r
430 #AddType application/x-gzip .tgz
\r
432 # AddEncoding allows you to have certain browsers uncompress
\r
433 # information on the fly. Note: Not all browsers support this.
\r
435 #AddEncoding x-compress .Z
\r
436 #AddEncoding x-gzip .gz .tgz
\r
438 # If the AddEncoding directives above are commented-out, then you
\r
439 # probably should define those extensions to indicate media types:
\r
441 AddType application/x-compress .Z
\r
442 AddType application/x-gzip .gz .tgz
\r
445 # AddHandler allows you to map certain file extensions to "handlers":
\r
446 # actions unrelated to filetype. These can be either built into the server
\r
447 # or added with the Action directive (see below)
\r
449 # To use CGI scripts outside of ScriptAliased directories:
\r
450 # (You will also need to add "ExecCGI" to the "Options" directive.)
\r
452 #AddHandler cgi-script .cgi
\r
454 # For type maps (negotiated resources):
\r
455 #AddHandler type-map var
\r
458 # Filters allow you to process content before it is sent to the client.
\r
460 # To parse .shtml files for server-side includes (SSI):
\r
461 # (You will also need to add "Includes" to the "Options" directive.)
\r
463 #AddType text/html .shtml
\r
464 #AddOutputFilter INCLUDES .shtml
\r
468 # The mod_mime_magic module allows the server to use various hints from the
\r
469 # contents of the file itself to determine its type. The MIMEMagicFile
\r
470 # directive tells the module where the hint definitions are located.
\r
472 #MIMEMagicFile conf/magic
\r
475 # Customizable error responses come in three flavors:
\r
476 # 1) plain text 2) local redirects 3) external redirects
\r
479 #ErrorDocument 500 "The server made a boo boo."
\r
480 #ErrorDocument 404 /missing.html
\r
481 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
\r
482 #ErrorDocument 402 http://www.example.com/subscription_info.html
\r
486 # MaxRanges: Maximum number of Ranges in a request before
\r
487 # returning the entire resource, or one of the special
\r
488 # values 'default', 'none' or 'unlimited'.
\r
489 # Default setting is to accept 200 Ranges.
\r
490 #MaxRanges unlimited
\r
493 # EnableMMAP and EnableSendfile: On systems that support it,
\r
494 # memory-mapping or the sendfile syscall may be used to deliver
\r
495 # files. This usually improves server performance, but must
\r
496 # be turned off when serving from networked-mounted
\r
497 # filesystems or if support for these functions is otherwise
\r
498 # broken on your system.
\r
499 # Defaults: EnableMMAP On, EnableSendfile Off
\r
504 # Supplemental configuration
\r
506 # The configuration files in the conf/extra/ directory can be
\r
507 # included to add extra features or to modify the default configuration of
\r
508 # the server, or you may simply copy their contents here and change as
\r
511 # Server-pool management (MPM specific)
\r
512 #Include conf/extra/httpd-mpm.conf
\r
514 # Multi-language error messages
\r
515 #Include conf/extra/httpd-multilang-errordoc.conf
\r
517 # Fancy directory listings
\r
518 #Include conf/extra/httpd-autoindex.conf
\r
520 # Language settings
\r
521 #Include conf/extra/httpd-languages.conf
\r
523 # User home directories
\r
524 #Include conf/extra/httpd-userdir.conf
\r
526 # Real-time info on requests and configuration
\r
527 #Include conf/extra/httpd-info.conf
\r
530 #Include conf/extra/httpd-vhosts.conf
\r
532 # Local access to the Apache HTTP Server Manual
\r
533 #Include conf/extra/httpd-manual.conf
\r
535 # Distributed authoring and versioning (WebDAV)
\r
536 #Include conf/extra/httpd-dav.conf
\r
538 # Various default settings
\r
539 #Include conf/extra/httpd-default.conf
\r
541 # Configure mod_proxy_html to understand HTML4/XHTML1
\r
542 <IfModule proxy_html_module>
\r
543 Include conf/extra/proxy-html.conf
\r
546 # Secure (SSL/TLS) connections
\r
547 #Include conf/extra/httpd-ssl.conf
\r
549 # Note: The following must must be present to support
\r
550 # starting without SSL on platforms with no /dev/random equivalent
\r
551 # but a statically compiled-in mod_ssl.
\r
553 <IfModule ssl_module>
\r
554 SSLRandomSeed startup builtin
\r
555 SSLRandomSeed connect builtin
\r