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