]> granicus.if.org Git - apache/blob - docs/conf/httpd.conf.in
Update SSL cipher suite and add example for SSLHonorCipherOrder.
[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 # DocumentRoot: The directory out of which you will serve your
111 # documents. By default, all requests are taken from this directory, but
112 # symbolic links and aliases may be used to point to other locations.
113 #
114 DocumentRoot "@exp_htdocsdir@"
115
116 #
117 # Each directory to which Apache has access can be configured with respect
118 # to which services and features are allowed and/or disabled in that
119 # directory (and its subdirectories). 
120 #
121 # First, we configure the "default" to be a very restrictive set of 
122 # features.  
123 #
124 <Directory />
125     Options FollowSymLinks
126     AllowOverride None
127     Require all denied
128 </Directory>
129
130 #
131 # Note that from this point forward you must specifically allow
132 # particular features to be enabled - so if something's not working as
133 # you might expect, make sure that you have specifically enabled it
134 # below.
135 #
136
137 #
138 # This should be changed to whatever you set DocumentRoot to.
139 #
140 <Directory "@exp_htdocsdir@">
141     #
142     # Possible values for the Options directive are "None", "All",
143     # or any combination of:
144     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
145     #
146     # Note that "MultiViews" must be named *explicitly* --- "Options All"
147     # doesn't give it to you.
148     #
149     # The Options directive is both complicated and important.  Please see
150     # http://httpd.apache.org/docs/trunk/mod/core.html#options
151     # for more information.
152     #
153     Options Indexes FollowSymLinks
154
155     #
156     # AllowOverride controls what directives may be placed in .htaccess files.
157     # It can be "All", "None", or any combination of the keywords:
158     #   Options FileInfo AuthConfig Limit
159     #
160     AllowOverride None
161
162     #
163     # Controls who can get stuff from this server.
164     #
165     Require all granted
166 </Directory>
167
168 #
169 # DirectoryIndex: sets the file that Apache will serve if a directory
170 # is requested.
171 #
172 <IfModule dir_module>
173     DirectoryIndex index.html
174 </IfModule>
175
176 #
177 # The following lines prevent .htaccess and .htpasswd files from being 
178 # viewed by Web clients. 
179 #
180 <FilesMatch "^\.ht">
181     Require all denied
182 </FilesMatch>
183
184 #
185 # ErrorLog: The location of the error log file.
186 # If you do not specify an ErrorLog directive within a <VirtualHost>
187 # container, error messages relating to that virtual host will be
188 # logged here.  If you *do* define an error logfile for a <VirtualHost>
189 # container, that host's errors will be logged there and not here.
190 #
191 ErrorLog "@rel_logfiledir@/error_log"
192
193 #
194 # LogLevel: Control the number of messages logged to the error_log.
195 # Possible values include: debug, info, notice, warn, error, crit,
196 # alert, emerg.
197 #
198 LogLevel warn
199
200 <IfModule log_config_module>
201     #
202     # The following directives define some format nicknames for use with
203     # a CustomLog directive (see below).
204     #
205     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
206     LogFormat "%h %l %u %t \"%r\" %>s %b" common
207
208     <IfModule logio_module>
209       # You need to enable mod_logio.c to use %I and %O
210       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
211     </IfModule>
212
213     #
214     # The location and format of the access logfile (Common Logfile Format).
215     # If you do not define any access logfiles within a <VirtualHost>
216     # container, they will be logged here.  Contrariwise, if you *do*
217     # define per-<VirtualHost> access logfiles, transactions will be
218     # logged therein and *not* in this file.
219     #
220     CustomLog "@rel_logfiledir@/access_log" common
221
222     #
223     # If you prefer a logfile with access, agent, and referer information
224     # (Combined Logfile Format) you can use the following directive.
225     #
226     #CustomLog "@rel_logfiledir@/access_log" combined
227 </IfModule>
228
229 <IfModule alias_module>
230     #
231     # Redirect: Allows you to tell clients about documents that used to 
232     # exist in your server's namespace, but do not anymore. The client 
233     # will make a new request for the document at its new location.
234     # Example:
235     # Redirect permanent /foo http://www.example.com/bar
236
237     #
238     # Alias: Maps web paths into filesystem paths and is used to
239     # access content that does not live under the DocumentRoot.
240     # Example:
241     # Alias /webpath /full/filesystem/path
242     #
243     # If you include a trailing / on /webpath then the server will
244     # require it to be present in the URL.  You will also likely
245     # need to provide a <Directory> section to allow access to
246     # the filesystem path.
247
248     #
249     # ScriptAlias: This controls which directories contain server scripts. 
250     # ScriptAliases are essentially the same as Aliases, except that
251     # documents in the target directory are treated as applications and
252     # run by the server when requested rather than as documents sent to the
253     # client.  The same rules about trailing "/" apply to ScriptAlias
254     # directives as to Alias.
255     #
256     ScriptAlias /cgi-bin/ "@exp_cgidir@/"
257
258 </IfModule>
259
260 <IfModule cgid_module>
261     #
262     # ScriptSock: On threaded servers, designate the path to the UNIX
263     # socket used to communicate with the CGI daemon of mod_cgid.
264     #
265     #Scriptsock @rel_runtimedir@/cgisock
266 </IfModule>
267
268 #
269 # "@exp_cgidir@" should be changed to whatever your ScriptAliased
270 # CGI directory exists, if you have that configured.
271 #
272 <Directory "@exp_cgidir@">
273     AllowOverride None
274     Options None
275     Require all granted
276 </Directory>
277
278 <IfModule mime_module>
279     #
280     # TypesConfig points to the file containing the list of mappings from
281     # filename extension to MIME-type.
282     #
283     TypesConfig @rel_sysconfdir@/mime.types
284
285     #
286     # AddType allows you to add to or override the MIME configuration
287     # file specified in TypesConfig for specific file types.
288     #
289     #AddType application/x-gzip .tgz
290     #
291     # AddEncoding allows you to have certain browsers uncompress
292     # information on the fly. Note: Not all browsers support this.
293     #
294     #AddEncoding x-compress .Z
295     #AddEncoding x-gzip .gz .tgz
296     #
297     # If the AddEncoding directives above are commented-out, then you
298     # probably should define those extensions to indicate media types:
299     #
300     AddType application/x-compress .Z
301     AddType application/x-gzip .gz .tgz
302
303     #
304     # AddHandler allows you to map certain file extensions to "handlers":
305     # actions unrelated to filetype. These can be either built into the server
306     # or added with the Action directive (see below)
307     #
308     # To use CGI scripts outside of ScriptAliased directories:
309     # (You will also need to add "ExecCGI" to the "Options" directive.)
310     #
311     #AddHandler cgi-script .cgi
312
313     # For type maps (negotiated resources):
314     #AddHandler type-map var
315
316     #
317     # Filters allow you to process content before it is sent to the client.
318     #
319     # To parse .shtml files for server-side includes (SSI):
320     # (You will also need to add "Includes" to the "Options" directive.)
321     #
322     #AddType text/html .shtml
323     #AddOutputFilter INCLUDES .shtml
324 </IfModule>
325
326 #
327 # The mod_mime_magic module allows the server to use various hints from the
328 # contents of the file itself to determine its type.  The MIMEMagicFile
329 # directive tells the module where the hint definitions are located.
330 #
331 #MIMEMagicFile @rel_sysconfdir@/magic
332
333 #
334 # Customizable error responses come in three flavors:
335 # 1) plain text 2) local redirects 3) external redirects
336 #
337 # Some examples:
338 #ErrorDocument 500 "The server made a boo boo."
339 #ErrorDocument 404 /missing.html
340 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
341 #ErrorDocument 402 http://www.example.com/subscription_info.html
342 #
343
344 #
345 # EnableMMAP and EnableSendfile: On systems that support it, 
346 # memory-mapping or the sendfile syscall is used to deliver
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.
351 #
352 #EnableMMAP off
353 #EnableSendfile off
354
355 # Supplemental configuration
356 #
357 # The configuration files in the @rel_sysconfdir@/extra/ directory can be 
358 # included to add extra features or to modify the default configuration of 
359 # the server, or you may simply copy their contents here and change as 
360 # necessary.
361
362 # Server-pool management (MPM specific)
363 #Include @rel_sysconfdir@/extra/httpd-mpm.conf
364
365 # Multi-language error messages
366 #Include @rel_sysconfdir@/extra/httpd-multilang-errordoc.conf
367
368 # Fancy directory listings
369 #Include @rel_sysconfdir@/extra/httpd-autoindex.conf
370
371 # Language settings
372 #Include @rel_sysconfdir@/extra/httpd-languages.conf
373
374 # User home directories
375 #Include @rel_sysconfdir@/extra/httpd-userdir.conf
376
377 # Real-time info on requests and configuration
378 #Include @rel_sysconfdir@/extra/httpd-info.conf
379
380 # Virtual hosts
381 #Include @rel_sysconfdir@/extra/httpd-vhosts.conf
382
383 # Local access to the Apache HTTP Server Manual
384 #Include @rel_sysconfdir@/extra/httpd-manual.conf
385
386 # Distributed authoring and versioning (WebDAV)
387 #Include @rel_sysconfdir@/extra/httpd-dav.conf
388
389 # Various default settings
390 #Include @rel_sysconfdir@/extra/httpd-default.conf
391
392 # Secure (SSL/TLS) connections
393 #Include @rel_sysconfdir@/extra/httpd-ssl.conf
394 #
395 # Note: The following must must be present to support
396 #       starting without SSL on platforms with no /dev/random equivalent
397 #       but a statically compiled-in mod_ssl.
398 #
399 <IfModule ssl_module>
400 SSLRandomSeed startup builtin
401 SSLRandomSeed connect builtin
402 </IfModule>