Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 422 lines (368 sloc) 13.843 kB
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
1 #
2 # This is the main Apache HTTP server configuration file. It contains the
3 # configuration directives that give the server its instructions.
888624e centralize the versioning of the httpd and the docs directories
Andre Malo authored
4 # See <URL:http://httpd.apache.org/docs/trunk/> for detailed information.
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
5 # In particular, see
888624e centralize the versioning of the httpd and the docs directories
Andre Malo authored
6 # <URL:http://httpd.apache.org/docs/trunk/mod/directives.html>
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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
5e2e72e @rbowen Based on feedback from Vincent from the docs team, change the examples
rbowen authored
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'.
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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
c391b9d @trawick Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
trawick authored
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.
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
30 #
31 ServerRoot "@@ServerRoot@@"
32
33 #
c391b9d @trawick Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
trawick authored
34 # Mutex: Allows you to set the mutex mechanism and mutex file directory
35 # for individual mutexes, or change the global defaults
36 #
d22aca5 @trawick catch up with updated Mutex syntax
trawick authored
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.
c391b9d @trawick Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
trawick authored
40 #
d22aca5 @trawick catch up with updated Mutex syntax
trawick authored
41 # Mutex default:@rel_runtimedir@
c391b9d @trawick Replace AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex,
trawick authored
42
43 #
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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
4fa3aa4 @colmmacc These days in most cases, "all bound IP addresses" means :: and 0.0.0.0
colmmacc authored
49 # prevent Apache from glomming onto all bound IP addresses.
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
50 #
51 #Listen 12.34.56.78:80
52 Listen @@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
7291a3e Fix IfModule in default configuration according
Rainer Jung authored
68 <IfModule unixd_module>
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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.
ef27206 @wsanchez Using the user nobody (or similar accounts on other systems like
wsanchez authored
74 # It is usually good practice to create a dedicated user and group for
75 # running httpd, as with most system services.
76 #
77 User daemon
78 Group daemon
1952b82 @wrowe Start preparing to use the general-case httpd.conf.in,
wrowe authored
79
80 </IfModule>
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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 #
99 ServerAdmin 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 #
1952b82 @wrowe Start preparing to use the general-case httpd.conf.in,
wrowe authored
108 #ServerName www.example.com:@@Port@@
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
109
110 #
072621a @rbowen igalic reminded me that AllowOverride now defaults to none, and Options
rbowen authored
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.
5f679bb @rbowen Warn the server admin not to relax the security of <Directory />
rbowen authored
114 #
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
115 <Directory />
fd494ba @pquerna Default to not allowing htaccess in /, instead of just the documentro…
pquerna authored
116 AllowOverride none
ce3c762 Authz refactoring
Bradley Nicholes authored
117 Require all denied
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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 #
5fb57d6 @rbowen Moves the DocumentRoot declaration down to immediately above the
rbowen authored
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.
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
131 #
5fb57d6 @rbowen Moves the DocumentRoot declaration down to immediately above the
rbowen authored
132 DocumentRoot "@exp_htdocsdir@"
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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
888624e centralize the versioning of the httpd and the docs directories
Andre Malo authored
143 # http://httpd.apache.org/docs/trunk/mod/core.html#options
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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 # Options FileInfo AuthConfig Limit
152 #
153 AllowOverride None
154
155 #
156 # Controls who can get stuff from this server.
157 #
ce3c762 Authz refactoring
Bradley Nicholes authored
158 Require all granted
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
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 #
8e641bf @igalic pr#50371 no more pcre
igalic authored
173 <Files ".ht*">
ce3c762 Authz refactoring
Bradley Nicholes authored
174 Require all denied
3316e7d @igalic pr#50371 whoops, missed something.
igalic authored
175 </Files>
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
176
177 #
178 # ErrorLog: The location of the error log file.
179 # If you do not specify an ErrorLog directive within a <VirtualHost>
180 # container, error messages relating to that virtual host will be
181 # logged here. If you *do* define an error logfile for a <VirtualHost>
182 # container, that host's errors will be logged there and not here.
183 #
1952b82 @wrowe Start preparing to use the general-case httpd.conf.in,
wrowe authored
184 ErrorLog "@rel_logfiledir@/error_log"
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
185
186 #
187 # LogLevel: Control the number of messages logged to the error_log.
188 # Possible values include: debug, info, notice, warn, error, crit,
189 # alert, emerg.
190 #
191 LogLevel warn
192
193 <IfModule log_config_module>
194 #
195 # The following directives define some format nicknames for use with
196 # a CustomLog directive (see below).
197 #
198 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
199 LogFormat "%h %l %u %t \"%r\" %>s %b" common
200
201 <IfModule logio_module>
202 # You need to enable mod_logio.c to use %I and %O
203 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
204 </IfModule>
205
206 #
207 # The location and format of the access logfile (Common Logfile Format).
208 # If you do not define any access logfiles within a <VirtualHost>
209 # container, they will be logged here. Contrariwise, if you *do*
210 # define per-<VirtualHost> access logfiles, transactions will be
211 # logged therein and *not* in this file.
212 #
1952b82 @wrowe Start preparing to use the general-case httpd.conf.in,
wrowe authored
213 CustomLog "@rel_logfiledir@/access_log" common
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
214
215 #
216 # If you prefer a logfile with access, agent, and referer information
217 # (Combined Logfile Format) you can use the following directive.
218 #
1952b82 @wrowe Start preparing to use the general-case httpd.conf.in,
wrowe authored
219 #CustomLog "@rel_logfiledir@/access_log" combined
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
220 </IfModule>
221
222 <IfModule alias_module>
223 #
224 # Redirect: Allows you to tell clients about documents that used to
225 # exist in your server's namespace, but do not anymore. The client
226 # will make a new request for the document at its new location.
227 # Example:
228 # Redirect permanent /foo http://www.example.com/bar
229
230 #
231 # Alias: Maps web paths into filesystem paths and is used to
232 # access content that does not live under the DocumentRoot.
233 # Example:
234 # Alias /webpath /full/filesystem/path
235 #
236 # If you include a trailing / on /webpath then the server will
237 # require it to be present in the URL. You will also likely
238 # need to provide a <Directory> section to allow access to
239 # the filesystem path.
240
241 #
242 # ScriptAlias: This controls which directories contain server scripts.
243 # ScriptAliases are essentially the same as Aliases, except that
244 # documents in the target directory are treated as applications and
245 # run by the server when requested rather than as documents sent to the
246 # client. The same rules about trailing "/" apply to ScriptAlias
247 # directives as to Alias.
248 #
249 ScriptAlias /cgi-bin/ "@exp_cgidir@/"
250
251 </IfModule>
252
253 <IfModule cgid_module>
254 #
255 # ScriptSock: On threaded servers, designate the path to the UNIX
256 # socket used to communicate with the CGI daemon of mod_cgid.
257 #
66b9b49 @trawick doc fixes for r1299718:
trawick authored
258 #Scriptsock cgisock
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
259 </IfModule>
260
261 #
262 # "@exp_cgidir@" should be changed to whatever your ScriptAliased
263 # CGI directory exists, if you have that configured.
264 #
265 <Directory "@exp_cgidir@">
266 AllowOverride None
267 Options None
ce3c762 Authz refactoring
Bradley Nicholes authored
268 Require all granted
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
269 </Directory>
270
271 <IfModule mime_module>
272 #
273 # TypesConfig points to the file containing the list of mappings from
274 # filename extension to MIME-type.
275 #
276 TypesConfig @rel_sysconfdir@/mime.types
277
278 #
279 # AddType allows you to add to or override the MIME configuration
280 # file specified in TypesConfig for specific file types.
281 #
282 #AddType application/x-gzip .tgz
283 #
284 # AddEncoding allows you to have certain browsers uncompress
285 # information on the fly. Note: Not all browsers support this.
286 #
287 #AddEncoding x-compress .Z
288 #AddEncoding x-gzip .gz .tgz
289 #
290 # If the AddEncoding directives above are commented-out, then you
291 # probably should define those extensions to indicate media types:
292 #
293 AddType application/x-compress .Z
294 AddType application/x-gzip .gz .tgz
295
296 #
297 # AddHandler allows you to map certain file extensions to "handlers":
298 # actions unrelated to filetype. These can be either built into the server
299 # or added with the Action directive (see below)
300 #
301 # To use CGI scripts outside of ScriptAliased directories:
302 # (You will also need to add "ExecCGI" to the "Options" directive.)
303 #
304 #AddHandler cgi-script .cgi
305
306 # For type maps (negotiated resources):
307 #AddHandler type-map var
308
309 #
310 # Filters allow you to process content before it is sent to the client.
311 #
312 # To parse .shtml files for server-side includes (SSI):
313 # (You will also need to add "Includes" to the "Options" directive.)
314 #
315 #AddType text/html .shtml
316 #AddOutputFilter INCLUDES .shtml
317 </IfModule>
318
319 #
320 # The mod_mime_magic module allows the server to use various hints from the
321 # contents of the file itself to determine its type. The MIMEMagicFile
322 # directive tells the module where the hint definitions are located.
323 #
324 #MIMEMagicFile @rel_sysconfdir@/magic
325
326 #
327 # Customizable error responses come in three flavors:
328 # 1) plain text 2) local redirects 3) external redirects
329 #
330 # Some examples:
331 #ErrorDocument 500 "The server made a boo boo."
332 #ErrorDocument 404 /missing.html
333 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
334 #ErrorDocument 402 http://www.example.com/subscription_info.html
335 #
336
337 #
eb74280 Added MaxRanges to httpd.conf.
Guenter Knauf authored
338 # MaxRanges: Maximum number of Ranges in a request before
46c7ddb Clarify configuration comment.
Rainer Jung authored
339 # returning the entire resource, or one of the special
340 # values 'default', 'none' or 'unlimited'.
341 # Default setting is to accept 200 Ranges.
d823ef6 Fixed MaxRanges config block.
Guenter Knauf authored
342 #MaxRanges unlimited
eb74280 Added MaxRanges to httpd.conf.
Guenter Knauf authored
343
344 #
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
345 # EnableMMAP and EnableSendfile: On systems that support it,
aa7dd7e Disable sendfile by default, as discussed at
Stefan Fritsch authored
346 # memory-mapping or the sendfile syscall may be used to deliver
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
347 # files. This usually improves server performance, but must
348 # be turned off when serving from networked-mounted
349 # filesystems or if support for these functions is otherwise
350 # broken on your system.
aa7dd7e Disable sendfile by default, as discussed at
Stefan Fritsch authored
351 # Defaults: EnableMMAP On, EnableSendfile Off
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
352 #
353 #EnableMMAP off
aa7dd7e Disable sendfile by default, as discussed at
Stefan Fritsch authored
354 #EnableSendfile on
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
355
356 # Supplemental configuration
357 #
358 # The configuration files in the @rel_sysconfdir@/extra/ directory can be
359 # included to add extra features or to modify the default configuration of
360 # the server, or you may simply copy their contents here and change as
361 # necessary.
362
363 # Server-pool management (MPM specific)
364 #Include @rel_sysconfdir@/extra/httpd-mpm.conf
365
366 # Multi-language error messages
367 #Include @rel_sysconfdir@/extra/httpd-multilang-errordoc.conf
368
369 # Fancy directory listings
370 #Include @rel_sysconfdir@/extra/httpd-autoindex.conf
371
372 # Language settings
373 #Include @rel_sysconfdir@/extra/httpd-languages.conf
374
375 # User home directories
376 #Include @rel_sysconfdir@/extra/httpd-userdir.conf
377
378 # Real-time info on requests and configuration
379 #Include @rel_sysconfdir@/extra/httpd-info.conf
380
381 # Virtual hosts
382 #Include @rel_sysconfdir@/extra/httpd-vhosts.conf
383
384 # Local access to the Apache HTTP Server Manual
385 #Include @rel_sysconfdir@/extra/httpd-manual.conf
386
387 # Distributed authoring and versioning (WebDAV)
388 #Include @rel_sysconfdir@/extra/httpd-dav.conf
389
390 # Various default settings
391 #Include @rel_sysconfdir@/extra/httpd-default.conf
392
e078f08 @minfrin mod_policy: Add a new testing module to help server administrators
minfrin authored
393 # Policy enforcement
394 #Include @rel_sysconfdir@/extra/httpd-policy.conf
395
c3f8ad7 proxy-html.conf needs to be included automatically
Nick Kew authored
396 # Configure mod_proxy_html to understand HTML4/XHTML1
397 <IfModule proxy_html_module>
398 Include @rel_sysconfdir@/extra/proxy-html.conf
399 </IfModule>
11585d6 Add default proxy-html.conf file (defines links to be rewritten
Nick Kew authored
400
8d37718 Merged the simple-conf branch changes r159781:160695 into the trunk.
Joshua Slive authored
401 # Secure (SSL/TLS) connections
402 #Include @rel_sysconfdir@/extra/httpd-ssl.conf
403 #
404 # Note: The following must must be present to support
405 # starting without SSL on platforms with no /dev/random equivalent
406 # but a statically compiled-in mod_ssl.
407 #
408 <IfModule ssl_module>
409 SSLRandomSeed startup builtin
410 SSLRandomSeed connect builtin
411 </IfModule>
a381ff3 Apache does not tolerate deliberate abuse of open standards
Roy T. Fielding authored
412
413 # Deal with user agents that deliberately violate open standards
414 #
415 <IfModule setenvif_module>
416 BrowserMatch "MSIE 10.0;" bad_DNT
417 </IfModule>
418 <IfModule headers_module>
419 RequestHeader unset DNT env=bad_DNT
420 </IfModule>
421
Something went wrong with that request. Please try again.