OSDN Git Service

e78165231e791d2ede421e16eaf5405727b859ee
[redminele/redminele.git] / template / apache / conf / httpd.conf.erb
1 #\r
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.2> for detailed information.\r
5 # In particular, see \r
6 # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>\r
7 # for a discussion of each configuration directive.\r
8 #\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
12 #\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/foo.log"\r
17 # with ServerRoot set to "<%= apache_root %>" will be interpreted by the\r
18 # server as "<%= apache_root %>/logs/foo.log".\r
19 #\r
20 # NOTE: Where filenames are specified, you must use forward slashes\r
21 # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").\r
22 # If a drive letter is omitted, the drive on which httpd.exe is located\r
23 # will be used by default.  It is recommended that you always supply\r
24 # an explicit drive letter in absolute paths to avoid confusion.\r
25 \r
26 #\r
27 # ServerRoot: The top of the directory tree under which the server's\r
28 # configuration, error, and log files are kept.\r
29 #\r
30 # Do not add a slash at the end of the directory path.  If you point\r
31 # ServerRoot at a non-local disk, be sure to point the LockFile directive\r
32 # at a local disk.  If you wish to share the same ServerRoot for multiple\r
33 # httpd daemons, you will need to change at least LockFile and PidFile.\r
34 #\r
35 ServerRoot "<%= apache_root %>"\r
36 \r
37 #\r
38 # Listen: Allows you to bind Apache to specific IP addresses and/or\r
39 # ports, instead of the default. See also the <VirtualHost>\r
40 # directive.\r
41 #\r
42 # Change this to Listen on specific IP addresses as shown below to \r
43 # prevent Apache from glomming onto all bound IP addresses.\r
44 #\r
45 #Listen 12.34.56.78:80\r
46 Listen <%= apache_port %>\r
47 \r
48 #\r
49 # Dynamic Shared Object (DSO) Support\r
50 #\r
51 # To be able to use the functionality of a module which was built as a DSO you\r
52 # have to place corresponding `LoadModule' lines at this location so the\r
53 # directives contained in it are actually available _before_ they are used.\r
54 # Statically compiled modules (those listed by `httpd -l') do not need\r
55 # to be loaded here.\r
56 #\r
57 # Example:\r
58 # LoadModule foo_module modules/mod_foo.so\r
59 #\r
60 LoadModule actions_module modules/mod_actions.so\r
61 LoadModule alias_module modules/mod_alias.so\r
62 LoadModule asis_module modules/mod_asis.so\r
63 LoadModule auth_basic_module modules/mod_auth_basic.so\r
64 #LoadModule auth_digest_module modules/mod_auth_digest.so\r
65 #LoadModule authn_alias_module modules/mod_authn_alias.so\r
66 #LoadModule authn_anon_module modules/mod_authn_anon.so\r
67 #LoadModule authn_dbd_module modules/mod_authn_dbd.so\r
68 #LoadModule authn_dbm_module modules/mod_authn_dbm.so\r
69 LoadModule authn_default_module modules/mod_authn_default.so\r
70 LoadModule authn_file_module modules/mod_authn_file.so\r
71 LoadModule authnz_ldap_module modules/mod_authnz_ldap.so\r
72 #LoadModule authz_dbm_module modules/mod_authz_dbm.so\r
73 LoadModule authz_default_module modules/mod_authz_default.so\r
74 LoadModule authz_groupfile_module modules/mod_authz_groupfile.so\r
75 LoadModule authz_host_module modules/mod_authz_host.so\r
76 #LoadModule authz_owner_module modules/mod_authz_owner.so\r
77 LoadModule authz_user_module modules/mod_authz_user.so\r
78 LoadModule autoindex_module modules/mod_autoindex.so\r
79 #LoadModule cache_module modules/mod_cache.so\r
80 #LoadModule cern_meta_module modules/mod_cern_meta.so\r
81 LoadModule cgi_module modules/mod_cgi.so\r
82 #LoadModule charset_lite_module modules/mod_charset_lite.so\r
83 LoadModule dav_module modules/mod_dav.so\r
84 LoadModule dav_fs_module modules/mod_dav_fs.so\r
85 LoadModule dav_lock_module modules/mod_dav_lock.so\r
86 #LoadModule dbd_module modules/mod_dbd.so\r
87 #LoadModule deflate_module modules/mod_deflate.so\r
88 LoadModule dir_module modules/mod_dir.so\r
89 #LoadModule disk_cache_module modules/mod_disk_cache.so\r
90 #LoadModule dumpio_module modules/mod_dumpio.so\r
91 LoadModule env_module modules/mod_env.so\r
92 #LoadModule expires_module modules/mod_expires.so\r
93 #LoadModule ext_filter_module modules/mod_ext_filter.so\r
94 #LoadModule file_cache_module modules/mod_file_cache.so\r
95 #LoadModule filter_module modules/mod_filter.so\r
96 #LoadModule headers_module modules/mod_headers.so\r
97 #LoadModule ident_module modules/mod_ident.so\r
98 #LoadModule imagemap_module modules/mod_imagemap.so\r
99 LoadModule include_module modules/mod_include.so\r
100 #LoadModule info_module modules/mod_info.so\r
101 LoadModule isapi_module modules/mod_isapi.so\r
102 LoadModule ldap_module modules/mod_ldap.so\r
103 #LoadModule logio_module modules/mod_logio.so\r
104 LoadModule log_config_module modules/mod_log_config.so\r
105 #LoadModule log_forensic_module modules/mod_log_forensic.so\r
106 #LoadModule mem_cache_module modules/mod_mem_cache.so\r
107 LoadModule mime_module modules/mod_mime.so\r
108 #LoadModule mime_magic_module modules/mod_mime_magic.so\r
109 LoadModule negotiation_module modules/mod_negotiation.so\r
110 LoadModule proxy_module modules/mod_proxy.so\r
111 #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so\r
112 #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so\r
113 #LoadModule proxy_connect_module modules/mod_proxy_connect.so\r
114 #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so\r
115 LoadModule proxy_http_module modules/mod_proxy_http.so\r
116 #LoadModule rewrite_module modules/mod_rewrite.so\r
117 LoadModule setenvif_module modules/mod_setenvif.so\r
118 #LoadModule speling_module modules/mod_speling.so\r
119 #LoadModule ssl_module modules/mod_ssl.so\r
120 #LoadModule status_module modules/mod_status.so\r
121 #LoadModule substitute_module modules/mod_substitute.so\r
122 #LoadModule unique_id_module modules/mod_unique_id.so\r
123 #LoadModule userdir_module modules/mod_userdir.so\r
124 #LoadModule usertrack_module modules/mod_usertrack.so\r
125 #LoadModule version_module modules/mod_version.so\r
126 #LoadModule vhost_alias_module modules/mod_vhost_alias.so\r
127 \r
128 <IfModule !mpm_netware_module>\r
129 <IfModule !mpm_winnt_module>\r
130 #\r
131 # If you wish httpd to run as a different user or group, you must run\r
132 # httpd as root initially and it will switch.  \r
133 #\r
134 # User/Group: The name (or #number) of the user/group to run httpd as.\r
135 # It is usually good practice to create a dedicated user and group for\r
136 # running httpd, as with most system services.\r
137 #\r
138 User daemon\r
139 Group daemon\r
140 \r
141 </IfModule>\r
142 </IfModule>\r
143 \r
144 # 'Main' server configuration\r
145 #\r
146 # The directives in this section set up the values used by the 'main'\r
147 # server, which responds to any requests that aren't handled by a\r
148 # <VirtualHost> definition.  These values also provide defaults for\r
149 # any <VirtualHost> containers you may define later in the file.\r
150 #\r
151 # All of these directives may appear inside <VirtualHost> containers,\r
152 # in which case these default settings will be overridden for the\r
153 # virtual host being defined.\r
154 #\r
155 \r
156 #\r
157 # ServerAdmin: Your address, where problems with the server should be\r
158 # e-mailed.  This address appears on some server-generated pages, such\r
159 # as error documents.  e.g. admin@your-domain.com\r
160 #\r
161 ServerAdmin webmaster@somenet.com\r
162 \r
163 #\r
164 # ServerName gives the name and port that the server uses to identify itself.\r
165 # This can often be determined automatically, but we recommend you specify\r
166 # it explicitly to prevent problems during startup.\r
167 #\r
168 # If your host doesn't have a registered DNS name, enter its IP address here.\r
169 #\r
170 ServerName <%= fqdn_or_ipaddr %>:<%= apache_port %>\r
171 \r
172 #\r
173 # DocumentRoot: The directory out of which you will serve your\r
174 # documents. By default, all requests are taken from this directory, but\r
175 # symbolic links and aliases may be used to point to other locations.\r
176 #\r
177 DocumentRoot "<%= apache_root %>/htdocs"\r
178 \r
179 #\r
180 # Each directory to which Apache has access can be configured with respect\r
181 # to which services and features are allowed and/or disabled in that\r
182 # directory (and its subdirectories). \r
183 #\r
184 # First, we configure the "default" to be a very restrictive set of \r
185 # features.  \r
186 #\r
187 <Directory />\r
188     Options FollowSymLinks\r
189     AllowOverride None\r
190     Order deny,allow\r
191     Deny from all\r
192 </Directory>\r
193 \r
194 #\r
195 # Note that from this point forward you must specifically allow\r
196 # particular features to be enabled - so if something's not working as\r
197 # you might expect, make sure that you have specifically enabled it\r
198 # below.\r
199 #\r
200 \r
201 #\r
202 # This should be changed to whatever you set DocumentRoot to.\r
203 #\r
204 <Directory "<%= apache_root %>/htdocs">\r
205     #\r
206     # Possible values for the Options directive are "None", "All",\r
207     # or any combination of:\r
208     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews\r
209     #\r
210     # Note that "MultiViews" must be named *explicitly* --- "Options All"\r
211     # doesn't give it to you.\r
212     #\r
213     # The Options directive is both complicated and important.  Please see\r
214     # http://httpd.apache.org/docs/2.2/mod/core.html#options\r
215     # for more information.\r
216     #\r
217     Options Indexes FollowSymLinks\r
218 \r
219     #\r
220     # AllowOverride controls what directives may be placed in .htaccess files.\r
221     # It can be "All", "None", or any combination of the keywords:\r
222     #   Options FileInfo AuthConfig Limit\r
223     #\r
224     AllowOverride None\r
225 \r
226     #\r
227     # Controls who can get stuff from this server.\r
228     #\r
229     Order allow,deny\r
230     Allow from all\r
231 \r
232 </Directory>\r
233 \r
234 #\r
235 # DirectoryIndex: sets the file that Apache will serve if a directory\r
236 # is requested.\r
237 #\r
238 <IfModule dir_module>\r
239     DirectoryIndex index.html\r
240 </IfModule>\r
241 \r
242 #\r
243 # The following lines prevent .htaccess and .htpasswd files from being \r
244 # viewed by Web clients. \r
245 #\r
246 <FilesMatch "^\.ht">\r
247     Order allow,deny\r
248     Deny from all\r
249     Satisfy All\r
250 </FilesMatch>\r
251 \r
252 #\r
253 # ErrorLog: The location of the error log file.\r
254 # If you do not specify an ErrorLog directive within a <VirtualHost>\r
255 # container, error messages relating to that virtual host will be\r
256 # logged here.  If you *do* define an error logfile for a <VirtualHost>\r
257 # container, that host's errors will be logged there and not here.\r
258 #\r
259 ErrorLog "logs/error.log"\r
260 \r
261 #\r
262 # LogLevel: Control the number of messages logged to the error_log.\r
263 # Possible values include: debug, info, notice, warn, error, crit,\r
264 # alert, emerg.\r
265 #\r
266 LogLevel warn\r
267 \r
268 <IfModule log_config_module>\r
269     #\r
270     # The following directives define some format nicknames for use with\r
271     # a CustomLog directive (see below).\r
272     #\r
273     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined\r
274     LogFormat "%h %l %u %t \"%r\" %>s %b" common\r
275 \r
276     <IfModule logio_module>\r
277       # You need to enable mod_logio.c to use %I and %O\r
278       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio\r
279     </IfModule>\r
280 \r
281     #\r
282     # The location and format of the access logfile (Common Logfile Format).\r
283     # If you do not define any access logfiles within a <VirtualHost>\r
284     # container, they will be logged here.  Contrariwise, if you *do*\r
285     # define per-<VirtualHost> access logfiles, transactions will be\r
286     # logged therein and *not* in this file.\r
287     #\r
288     CustomLog "logs/access.log" common\r
289 \r
290     #\r
291     # If you prefer a logfile with access, agent, and referer information\r
292     # (Combined Logfile Format) you can use the following directive.\r
293     #\r
294     #CustomLog "logs/access.log" combined\r
295 </IfModule>\r
296 \r
297 <IfModule alias_module>\r
298     #\r
299     # Redirect: Allows you to tell clients about documents that used to \r
300     # exist in your server's namespace, but do not anymore. The client \r
301     # will make a new request for the document at its new location.\r
302     # Example:\r
303     # Redirect permanent /foo http://localhost/bar\r
304 \r
305     #\r
306     # Alias: Maps web paths into filesystem paths and is used to\r
307     # access content that does not live under the DocumentRoot.\r
308     # Example:\r
309     # Alias /webpath /full/filesystem/path\r
310     #\r
311     # If you include a trailing / on /webpath then the server will\r
312     # require it to be present in the URL.  You will also likely\r
313     # need to provide a <Directory> section to allow access to\r
314     # the filesystem path.\r
315 \r
316     #\r
317     # ScriptAlias: This controls which directories contain server scripts. \r
318     # ScriptAliases are essentially the same as Aliases, except that\r
319     # documents in the target directory are treated as applications and\r
320     # run by the server when requested rather than as documents sent to the\r
321     # client.  The same rules about trailing "/" apply to ScriptAlias\r
322     # directives as to Alias.\r
323     #\r
324     ScriptAlias /cgi-bin/ "<%= apache_root %>/cgi-bin/"\r
325 \r
326 </IfModule>\r
327 \r
328 <IfModule cgid_module>\r
329     #\r
330     # ScriptSock: On threaded servers, designate the path to the UNIX\r
331     # socket used to communicate with the CGI daemon of mod_cgid.\r
332     #\r
333     #Scriptsock logs/cgisock\r
334 </IfModule>\r
335 \r
336 #\r
337 # "<%= apache_root %>/cgi-bin" should be changed to whatever your ScriptAliased\r
338 # CGI directory exists, if you have that configured.\r
339 #\r
340 <Directory "<%= apache_root %>/cgi-bin">\r
341     AllowOverride None\r
342     Options None\r
343     Order allow,deny\r
344     Allow from all\r
345 </Directory>\r
346 \r
347 #\r
348 # DefaultType: the default MIME type the server will use for a document\r
349 # if it cannot otherwise determine one, such as from filename extensions.\r
350 # If your server contains mostly text or HTML documents, "text/plain" is\r
351 # a good value.  If most of your content is binary, such as applications\r
352 # or images, you may want to use "application/octet-stream" instead to\r
353 # keep browsers from trying to display binary files as though they are\r
354 # text.\r
355 #\r
356 DefaultType text/plain\r
357 \r
358 <IfModule mime_module>\r
359     #\r
360     # TypesConfig points to the file containing the list of mappings from\r
361     # filename extension to MIME-type.\r
362     #\r
363     TypesConfig conf/mime.types\r
364 \r
365     #\r
366     # AddType allows you to add to or override the MIME configuration\r
367     # file specified in TypesConfig for specific file types.\r
368     #\r
369     #AddType application/x-gzip .tgz\r
370     #\r
371     # AddEncoding allows you to have certain browsers uncompress\r
372     # information on the fly. Note: Not all browsers support this.\r
373     #\r
374     #AddEncoding x-compress .Z\r
375     #AddEncoding x-gzip .gz .tgz\r
376     #\r
377     # If the AddEncoding directives above are commented-out, then you\r
378     # probably should define those extensions to indicate media types:\r
379     #\r
380     AddType application/x-compress .Z\r
381     AddType application/x-gzip .gz .tgz\r
382 \r
383     #\r
384     # AddHandler allows you to map certain file extensions to "handlers":\r
385     # actions unrelated to filetype. These can be either built into the server\r
386     # or added with the Action directive (see below)\r
387     #\r
388     # To use CGI scripts outside of ScriptAliased directories:\r
389     # (You will also need to add "ExecCGI" to the "Options" directive.)\r
390     #\r
391     #AddHandler cgi-script .cgi\r
392 \r
393     # For type maps (negotiated resources):\r
394     #AddHandler type-map var\r
395 \r
396     #\r
397     # Filters allow you to process content before it is sent to the client.\r
398     #\r
399     # To parse .shtml files for server-side includes (SSI):\r
400     # (You will also need to add "Includes" to the "Options" directive.)\r
401     #\r
402     #AddType text/html .shtml\r
403     #AddOutputFilter INCLUDES .shtml\r
404 </IfModule>\r
405 \r
406 #\r
407 # The mod_mime_magic module allows the server to use various hints from the\r
408 # contents of the file itself to determine its type.  The MIMEMagicFile\r
409 # directive tells the module where the hint definitions are located.\r
410 #\r
411 #MIMEMagicFile conf/magic\r
412 \r
413 #\r
414 # Customizable error responses come in three flavors:\r
415 # 1) plain text 2) local redirects 3) external redirects\r
416 #\r
417 # Some examples:\r
418 #ErrorDocument 500 "The server made a boo boo."\r
419 #ErrorDocument 404 /missing.html\r
420 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"\r
421 #ErrorDocument 402 http://localhost/subscription_info.html\r
422 #\r
423 \r
424 #\r
425 # EnableMMAP and EnableSendfile: On systems that support it, \r
426 # memory-mapping or the sendfile syscall is used to deliver\r
427 # files.  This usually improves server performance, but must\r
428 # be turned off when serving from networked-mounted \r
429 # filesystems or if support for these functions is otherwise\r
430 # broken on your system.\r
431 #\r
432 #EnableMMAP off\r
433 #EnableSendfile off\r
434 \r
435 # Supplemental configuration\r
436 #\r
437 # The configuration files in the conf/extra/ directory can be \r
438 # included to add extra features or to modify the default configuration of \r
439 # the server, or you may simply copy their contents here and change as \r
440 # necessary.\r
441 \r
442 # Server-pool management (MPM specific)\r
443 #Include conf/extra/httpd-mpm.conf\r
444 \r
445 # Multi-language error messages\r
446 #Include conf/extra/httpd-multilang-errordoc.conf\r
447 \r
448 # Fancy directory listings\r
449 #Include conf/extra/httpd-autoindex.conf\r
450 \r
451 # Language settings\r
452 #Include conf/extra/httpd-languages.conf\r
453 \r
454 # User home directories\r
455 #Include conf/extra/httpd-userdir.conf\r
456 \r
457 # Real-time info on requests and configuration\r
458 #Include conf/extra/httpd-info.conf\r
459 \r
460 # Virtual hosts\r
461 #Include conf/extra/httpd-vhosts.conf\r
462 \r
463 # Local access to the Apache HTTP Server Manual\r
464 #Include conf/extra/httpd-manual.conf\r
465 \r
466 # Distributed authoring and versioning (WebDAV)\r
467 #Include conf/extra/httpd-dav.conf\r
468 \r
469 # Various default settings\r
470 #Include conf/extra/httpd-default.conf\r
471 \r
472 # Secure (SSL/TLS) connections\r
473 #Include conf/extra/httpd-ssl.conf\r
474 #\r
475 # Note: The following must must be present to support\r
476 #       starting without SSL on platforms with no /dev/random equivalent\r
477 #       but a statically compiled-in mod_ssl.\r
478 #\r
479 <IfModule ssl_module>\r
480 SSLRandomSeed startup builtin\r
481 SSLRandomSeed connect builtin\r
482 </IfModule>\r
483 \r
484 Include conf/conf.d/*.conf\r