]>
Commit | Line | Data |
---|---|---|
4af76ed4 | 1 | ## |
2 | ## httpd.conf -- Apache HTTP server configuration file | |
3 | ## | |
4 | ||
5 | # | |
6 | # Based upon the NCSA server configuration files originally by Rob McCool. | |
7 | # | |
8 | # This is the main Apache server configuration file. It contains the | |
9 | # configuration directives that give the server its instructions. | |
10 | # See <URL:http://www.apache.org/docs/> for detailed information about | |
11 | # the directives. | |
12 | # | |
13 | # Do NOT simply read the instructions in here without understanding | |
14 | # what they do. They're here only as hints or reminders. If you are unsure | |
15 | # consult the online docs. You have been warned. | |
16 | # | |
17 | # After this file is processed, the server will look for and process | |
18 | # /etc/httpd/srm.conf and then /etc/httpd/access.conf | |
19 | # unless you have overridden these with ResourceConfig and/or | |
20 | # AccessConfig directives here. | |
21 | # | |
22 | # The configuration directives are grouped into three basic sections: | |
23 | # 1. Directives that control the operation of the Apache server process as a | |
24 | # whole (the 'global environment'). | |
25 | # 2. Directives that define the parameters of the 'main' or 'default' server, | |
26 | # which responds to requests that aren't handled by a virtual host. | |
27 | # These directives also provide default values for the settings | |
28 | # of all virtual hosts. | |
29 | # 3. Settings for virtual hosts, which allow Web requests to be sent to | |
30 | # different IP addresses or hostnames and have them handled by the | |
31 | # same Apache server process. | |
32 | # | |
33 | # Configuration and logfile names: If the filenames you specify for many | |
34 | # of the server's control files begin with "/" (or "drive:/" for Win32), the | |
35 | # server will use that explicit path. If the filenames do *not* begin | |
36 | # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" | |
37 | # with ServerRoot set to "/usr/local/apache" will be interpreted by the | |
38 | # server as "/usr/local/apache/logs/foo.log". | |
39 | # | |
40 | ||
41 | ### Section 1: Global Environment | |
42 | # | |
43 | # The directives in this section affect the overall operation of Apache, | |
44 | # such as the number of concurrent requests it can handle or where it | |
45 | # can find its configuration files. | |
46 | # | |
47 | ||
48 | # | |
49 | # ServerType is either inetd, or standalone. Inetd mode is only supported on | |
50 | # Unix platforms. | |
51 | # | |
52 | ServerType standalone | |
53 | ||
54 | # | |
55 | # ServerRoot: The top of the directory tree under which the server's | |
56 | # configuration, error, and log files are kept. | |
57 | # | |
58 | # NOTE! If you intend to place this on an NFS (or otherwise network) | |
59 | # mounted filesystem then please read the LockFile documentation | |
60 | # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>); | |
61 | # you will save yourself a lot of trouble. | |
62 | # | |
63 | # Do NOT add a slash at the end of the directory path. | |
64 | # | |
65 | ServerRoot "/usr" | |
66 | ||
67 | # | |
68 | # The LockFile directive sets the path to the lockfile used when Apache | |
69 | # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or | |
70 | # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at | |
71 | # its default value. The main reason for changing it is if the logs | |
72 | # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL | |
73 | # DISK. The PID of the main server process is automatically appended to | |
74 | # the filename. | |
75 | # | |
76 | LockFile /var/run/httpd.lock | |
77 | ||
78 | # | |
79 | # PidFile: The file in which the server should record its process | |
80 | # identification number when it starts. | |
81 | # | |
82 | PidFile /var/run/httpd.pid | |
83 | ||
84 | # | |
85 | # ScoreBoardFile: File used to store internal server process information. | |
86 | # Not all architectures require this. But if yours does (you'll know because | |
87 | # this file will be created when you run Apache) then you *must* ensure that | |
88 | # no two invocations of Apache share the same scoreboard file. | |
89 | # | |
90 | ScoreBoardFile /var/run/httpd.scoreboard | |
91 | ||
92 | # | |
93 | # In the standard configuration, the server will process this file, | |
94 | # srm.conf, and access.conf in that order. The latter two files are | |
95 | # now distributed empty, as it is recommended that all directives | |
96 | # be kept in a single file for simplicity. The commented-out values | |
97 | # below are the built-in defaults. You can have the server ignore | |
98 | # these files altogether by using "/dev/null" (for Unix) or | |
99 | # "nul" (for Win32) for the arguments to the directives. | |
100 | # | |
101 | #ResourceConfig /etc/httpd/srm.conf | |
102 | AccessConfig /etc/httpd/access.conf | |
103 | ||
104 | # | |
105 | # Timeout: The number of seconds before receives and sends time out. | |
106 | # | |
107 | Timeout 300 | |
108 | ||
109 | # | |
110 | # KeepAlive: Whether or not to allow persistent connections (more than | |
111 | # one request per connection). Set to "Off" to deactivate. | |
112 | # | |
113 | KeepAlive On | |
114 | ||
115 | # | |
116 | # MaxKeepAliveRequests: The maximum number of requests to allow | |
117 | # during a persistent connection. Set to 0 to allow an unlimited amount. | |
118 | # We recommend you leave this number high, for maximum performance. | |
119 | # | |
120 | MaxKeepAliveRequests 100 | |
121 | ||
122 | # | |
123 | # KeepAliveTimeout: Number of seconds to wait for the next request from the | |
124 | # same client on the same connection. | |
125 | # | |
126 | KeepAliveTimeout 15 | |
127 | ||
128 | # | |
129 | # Server-pool size regulation. Rather than making you guess how many | |
130 | # server processes you need, Apache dynamically adapts to the load it | |
131 | # sees --- that is, it tries to maintain enough server processes to | |
132 | # handle the current load, plus a few spare servers to handle transient | |
133 | # load spikes (e.g., multiple simultaneous requests from a single | |
134 | # Netscape browser). | |
135 | # | |
136 | # It does this by periodically checking how many servers are waiting | |
137 | # for a request. If there are fewer than MinSpareServers, it creates | |
138 | # a new spare. If there are more than MaxSpareServers, some of the | |
139 | # spares die off. The default values are probably OK for most sites. | |
140 | # | |
141 | MinSpareServers 5 | |
142 | MaxSpareServers 10 | |
143 | ||
144 | # | |
145 | # Number of servers to start initially --- should be a reasonable ballpark | |
146 | # figure. | |
147 | # | |
148 | StartServers 5 | |
149 | ||
150 | # | |
151 | # Limit on total number of servers running, i.e., limit on the number | |
152 | # of clients who can simultaneously connect --- if this limit is ever | |
153 | # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. | |
154 | # It is intended mainly as a brake to keep a runaway server from taking | |
155 | # the system with it as it spirals down... | |
156 | # | |
157 | MaxClients 150 | |
158 | ||
159 | # | |
160 | # MaxRequestsPerChild: the number of requests each child process is | |
161 | # allowed to process before the child dies. The child will exit so | |
162 | # as to avoid problems after prolonged use when Apache (and maybe the | |
163 | # libraries it uses) leak memory or other resources. On most systems, this | |
164 | # isn't really needed, but a few (such as Solaris) do have notable leaks | |
165 | # in the libraries. | |
166 | # | |
167 | MaxRequestsPerChild 30 | |
168 | ||
169 | # | |
170 | # Listen: Allows you to bind Apache to specific IP addresses and/or | |
171 | # ports, in addition to the default. See also the <VirtualHost> | |
172 | # directive. | |
173 | # | |
174 | #Listen 3000 | |
175 | #Listen 12.34.56.78:80 | |
176 | ||
177 | # | |
178 | # BindAddress: You can support virtual hosts with this option. This directive | |
179 | # is used to tell the server which IP address to listen to. It can either | |
180 | # contain "*", an IP address, or a fully qualified Internet domain name. | |
181 | # See also the <VirtualHost> and Listen directives. | |
182 | # | |
183 | #BindAddress * | |
184 | ||
185 | # | |
186 | # Dynamic Shared Object (DSO) Support | |
187 | # | |
188 | # To be able to use the functionality of a module which was built as a DSO you | |
189 | # have to place corresponding `LoadModule' lines at this location so the | |
190 | # directives contained in it are actually available _before_ they are used. | |
191 | # Please read the file README.DSO in the Apache 1.3 distribution for more | |
192 | # details about the DSO mechanism and run `httpd -l' for the list of already | |
193 | # built-in (statically linked and thus always available) modules in your httpd | |
194 | # binary. | |
195 | # | |
196 | # Note: The order is which modules are loaded is important. Don't change | |
197 | # the order below without expert advice. | |
198 | # | |
199 | # Example: | |
200 | # LoadModule foo_module libexec/mod_foo.so | |
201 | LoadModule mmap_static_module lib/apache/mod_mmap_static.so | |
202 | LoadModule env_module lib/apache/mod_env.so | |
203 | LoadModule config_log_module lib/apache/mod_log_config.so | |
204 | LoadModule agent_log_module lib/apache/mod_log_agent.so | |
205 | LoadModule referer_log_module lib/apache/mod_log_referer.so | |
206 | LoadModule mime_magic_module lib/apache/mod_mime_magic.so | |
207 | LoadModule mime_module lib/apache/mod_mime.so | |
208 | LoadModule negotiation_module lib/apache/mod_negotiation.so | |
209 | LoadModule status_module lib/apache/mod_status.so | |
210 | LoadModule info_module lib/apache/mod_info.so | |
211 | LoadModule includes_module lib/apache/mod_include.so | |
212 | LoadModule autoindex_module lib/apache/mod_autoindex.so | |
213 | LoadModule dir_module lib/apache/mod_dir.so | |
214 | LoadModule cgi_module lib/apache/mod_cgi.so | |
215 | LoadModule asis_module lib/apache/mod_asis.so | |
216 | LoadModule imap_module lib/apache/mod_imap.so | |
217 | LoadModule action_module lib/apache/mod_actions.so | |
218 | LoadModule speling_module lib/apache/mod_speling.so | |
219 | LoadModule userdir_module lib/apache/mod_userdir.so | |
220 | LoadModule proxy_module lib/apache/libproxy.so | |
221 | LoadModule alias_module lib/apache/mod_alias.so | |
222 | LoadModule rewrite_module lib/apache/mod_rewrite.so | |
223 | LoadModule access_module lib/apache/mod_access.so | |
224 | LoadModule auth_module lib/apache/mod_auth.so | |
225 | LoadModule anon_auth_module lib/apache/mod_auth_anon.so | |
226 | LoadModule dbm_auth_module lib/apache/mod_auth_dbm.so | |
227 | LoadModule db_auth_module lib/apache/mod_auth_db.so | |
228 | LoadModule digest_module lib/apache/mod_digest.so | |
229 | LoadModule cern_meta_module lib/apache/mod_cern_meta.so | |
230 | LoadModule expires_module lib/apache/mod_expires.so | |
231 | LoadModule headers_module lib/apache/mod_headers.so | |
232 | LoadModule usertrack_module lib/apache/mod_usertrack.so | |
233 | LoadModule example_module lib/apache/mod_example.so | |
234 | LoadModule unique_id_module lib/apache/mod_unique_id.so | |
235 | LoadModule setenvif_module lib/apache/mod_setenvif.so | |
236 | ||
237 | # Reconstruction of the complete module list from all available modules | |
238 | # (static and shared ones) to achieve correct module execution order. | |
239 | # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] | |
240 | ClearModuleList | |
241 | AddModule mod_mmap_static.c | |
242 | AddModule mod_env.c | |
243 | AddModule mod_log_config.c | |
244 | AddModule mod_log_agent.c | |
245 | AddModule mod_log_referer.c | |
246 | AddModule mod_mime_magic.c | |
247 | AddModule mod_mime.c | |
248 | AddModule mod_negotiation.c | |
249 | AddModule mod_status.c | |
250 | AddModule mod_info.c | |
251 | AddModule mod_include.c | |
252 | AddModule mod_autoindex.c | |
253 | AddModule mod_dir.c | |
254 | AddModule mod_cgi.c | |
255 | AddModule mod_asis.c | |
256 | AddModule mod_imap.c | |
257 | AddModule mod_actions.c | |
258 | AddModule mod_speling.c | |
259 | AddModule mod_userdir.c | |
260 | AddModule mod_proxy.c | |
261 | AddModule mod_alias.c | |
262 | AddModule mod_rewrite.c | |
263 | AddModule mod_access.c | |
264 | AddModule mod_auth.c | |
265 | AddModule mod_auth_anon.c | |
266 | AddModule mod_auth_dbm.c | |
267 | AddModule mod_auth_db.c | |
268 | AddModule mod_digest.c | |
269 | AddModule mod_cern_meta.c | |
270 | AddModule mod_expires.c | |
271 | AddModule mod_headers.c | |
272 | AddModule mod_usertrack.c | |
273 | AddModule mod_example.c | |
274 | AddModule mod_unique_id.c | |
275 | AddModule mod_so.c | |
276 | AddModule mod_setenvif.c | |
277 | ||
278 | # | |
279 | # ExtendedStatus controls whether Apache will generate "full" status | |
280 | # information (ExtendedStatus On) or just basic information (ExtendedStatus | |
281 | # Off) when the "server-status" handler is called. The default is Off. | |
282 | # | |
283 | #ExtendedStatus On | |
284 | ||
285 | ### Section 2: 'Main' server configuration | |
286 | # | |
287 | # The directives in this section set up the values used by the 'main' | |
288 | # server, which responds to any requests that aren't handled by a | |
289 | # <VirtualHost> definition. These values also provide defaults for | |
290 | # any <VirtualHost> containers you may define later in the file. | |
291 | # | |
292 | # All of these directives may appear inside <VirtualHost> containers, | |
293 | # in which case these default settings will be overridden for the | |
294 | # virtual host being defined. | |
295 | # | |
296 | ||
297 | # | |
298 | # If your ServerType directive (set earlier in the 'Global Environment' | |
299 | # section) is set to "inetd", the next few directives don't have any | |
300 | # effect since their settings are defined by the inetd configuration. | |
301 | # Skip ahead to the ServerAdmin directive. | |
302 | # | |
303 | ||
304 | # | |
305 | # Port: The port to which the standalone server listens. For | |
306 | # ports < 1023, you will need httpd to be run as root initially. | |
307 | # | |
308 | Port 80 | |
309 | ||
310 | # | |
311 | # If you wish httpd to run as a different user or group, you must run | |
312 | # httpd as root initially and it will switch. | |
313 | # | |
314 | # User/Group: The name (or #number) of the user/group to run httpd as. | |
315 | # . On SCO (ODT 3) use "User nouser" and "Group nogroup". | |
316 | # . On HPUX you may not be able to use shared memory as nobody, and the | |
317 | # suggested workaround is to create a user www and use that user. | |
318 | # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) | |
319 | # when the value of (unsigned)Group is above 60000; | |
320 | # don't use Group on these systems! | |
321 | # | |
322 | User http | |
323 | Group http | |
324 | ||
325 | # | |
326 | # ServerAdmin: Your address, where problems with the server should be | |
327 | # e-mailed. This address appears on some server-generated pages, such | |
328 | # as error documents. | |
329 | # | |
330 | ServerAdmin admin@your_domain.org | |
331 | ||
332 | # | |
333 | # ServerName allows you to set a host name which is sent back to clients for | |
334 | # your server if it's different than the one the program would get (i.e., use | |
335 | # "www" instead of the host's real name). | |
336 | # | |
337 | # Note: You cannot just invent host names and hope they work. The name you | |
338 | # define here must be a valid DNS name for your host. If you don't understand | |
339 | # this, ask your network administrator. | |
340 | # If your host doesn't have a registered DNS name, enter its IP address here. | |
341 | # You will have to access it by its address (e.g., http://123.45.67.89/) | |
342 | # anyway, and this will make redirections work in a sensible way. | |
343 | # | |
344 | #ServerName new.host.name | |
345 | ||
346 | # | |
347 | # DocumentRoot: The directory out of which you will serve your | |
348 | # documents. By default, all requests are taken from this directory, but | |
349 | # symbolic links and aliases may be used to point to other locations. | |
350 | # | |
351 | DocumentRoot "/home/httpd/html" | |
352 | ||
353 | # | |
354 | # Each directory to which Apache has access, can be configured with respect | |
355 | # to which services and features are allowed and/or disabled in that | |
356 | # directory (and its subdirectories). | |
357 | # | |
358 | # First, we configure the "default" to be a very restrictive set of | |
359 | # permissions. | |
360 | # | |
361 | <Directory /> | |
362 | Options FollowSymLinks | |
363 | AllowOverride None | |
364 | </Directory> | |
365 | ||
366 | # | |
367 | # Note that from this point forward you must specifically allow | |
368 | # particular features to be enabled - so if something's not working as | |
369 | # you might expect, make sure that you have specifically enabled it | |
370 | # below. | |
371 | # | |
372 | ||
373 | # | |
374 | # This should be changed to whatever you set DocumentRoot to. | |
375 | # | |
376 | <Directory "/home/httpd/html"> | |
377 | ||
378 | # | |
379 | # This may also be "None", "All", or any combination of "Indexes", | |
380 | # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". | |
381 | # | |
382 | # Note that "MultiViews" must be named *explicitly* --- "Options All" | |
383 | # doesn't give it to you. | |
384 | # | |
385 | Options Indexes FollowSymLinks | |
386 | ||
387 | # | |
388 | # This controls which options the .htaccess files in directories can | |
389 | # override. Can also be "All", or any combination of "Options", "FileInfo", | |
390 | # "AuthConfig", and "Limit" | |
391 | # | |
392 | AllowOverride None | |
393 | ||
394 | # | |
395 | # Controls who can get stuff from this server. | |
396 | # | |
397 | Order allow,deny | |
398 | Allow from all | |
399 | </Directory> | |
400 | ||
401 | # | |
402 | # UserDir: The name of the directory which is appended onto a user's home | |
403 | # directory if a ~user request is received. | |
404 | # | |
405 | UserDir public_html | |
406 | ||
407 | # | |
408 | # Control access to UserDir directories. The following is an example | |
409 | # for a site where these directories are restricted to read-only. | |
410 | # | |
411 | #<Directory /*/public_html> | |
412 | # AllowOverride FileInfo AuthConfig Limit | |
413 | # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec | |
414 | # <Limit GET POST OPTIONS PROPFIND> | |
415 | # Order allow,deny | |
416 | # Allow from all | |
417 | # </Limit> | |
418 | # <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> | |
419 | # Order deny,allow | |
420 | # Deny from all | |
421 | # </Limit> | |
422 | #</Directory> | |
423 | ||
424 | # | |
425 | # DirectoryIndex: Name of the file or files to use as a pre-written HTML | |
426 | # directory index. Separate multiple entries with spaces. | |
427 | # | |
428 | DirectoryIndex index.html | |
429 | ||
430 | # | |
431 | # AccessFileName: The name of the file to look for in each directory | |
432 | # for access control information. | |
433 | # | |
434 | AccessFileName .htaccess | |
435 | ||
436 | # | |
437 | # The following lines prevent .htaccess files from being viewed by | |
438 | # Web clients. Since .htaccess files often contain authorization | |
439 | # information, access is disallowed for security reasons. Comment | |
440 | # these lines out if you want Web visitors to see the contents of | |
441 | # .htaccess files. If you change the AccessFileName directive above, | |
442 | # be sure to make the corresponding changes here. | |
443 | # | |
444 | <Files .htaccess> | |
445 | Order allow,deny | |
446 | Deny from all | |
447 | </Files> | |
448 | ||
449 | # | |
450 | # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each | |
451 | # document that was negotiated on the basis of content. This asks proxy | |
452 | # servers not to cache the document. Uncommenting the following line disables | |
453 | # this behavior, and proxies will be allowed to cache the documents. | |
454 | # | |
455 | #CacheNegotiatedDocs | |
456 | ||
457 | # | |
458 | # UseCanonicalName: (new for 1.3) With this setting turned on, whenever | |
459 | # Apache needs to construct a self-referencing URL (a URL that refers back | |
460 | # to the server the response is coming from) it will use ServerName and | |
461 | # Port to form a "canonical" name. With this setting off, Apache will | |
462 | # use the hostname:port that the client supplied, when possible. This | |
463 | # also affects SERVER_NAME and SERVER_PORT in CGI scripts. | |
464 | # | |
465 | UseCanonicalName On | |
466 | ||
467 | # | |
468 | # TypesConfig describes where the mime.types file (or equivalent) is | |
469 | # to be found. /etc/mime.types is provided by mailcap package. | |
470 | # | |
471 | TypesConfig /etc/mime.types | |
472 | ||
473 | # | |
474 | # DefaultType is the default MIME type the server will use for a document | |
475 | # if it cannot otherwise determine one, such as from filename extensions. | |
476 | # If your server contains mostly text or HTML documents, "text/plain" is | |
477 | # a good value. If most of your content is binary, such as applications | |
478 | # or images, you may want to use "application/octet-stream" instead to | |
479 | # keep browsers from trying to display binary files as though they are | |
480 | # text. | |
481 | # | |
482 | DefaultType text/plain | |
483 | ||
484 | # | |
485 | # The mod_mime_magic module allows the server to use various hints from the | |
486 | # contents of the file itself to determine its type. The MIMEMagicFile | |
487 | # directive tells the module where the hint definitions are located. | |
488 | # mod_mime_magic is not part of the default server (you have to add | |
489 | # it yourself with a LoadModule [see the DSO paragraph in the 'Global | |
490 | # Environment' section], or recompile the server and include mod_mime_magic | |
491 | # as part of the configuration), so it's enclosed in an <IfModule> container. | |
492 | # This means that the MIMEMagicFile directive will only be processed if the | |
493 | # module is part of the server. | |
494 | # | |
495 | <IfModule mod_mime_magic.c> | |
7ba668f5 | 496 | MIMEMagicFile /etc/httpd/magic |
4af76ed4 | 497 | </IfModule> |
498 | ||
499 | # | |
500 | # HostnameLookups: Log the names of clients or just their IP addresses | |
501 | # e.g., www.apache.org (on) or 204.62.129.132 (off). | |
502 | # The default is off because it'd be overall better for the net if people | |
503 | # had to knowingly turn this feature on, since enabling it means that | |
504 | # each client request will result in AT LEAST one lookup request to the | |
505 | # nameserver. | |
506 | # | |
507 | HostnameLookups Off | |
508 | ||
509 | # | |
510 | # ErrorLog: The location of the error log file. | |
511 | # If you do not specify an ErrorLog directive within a <VirtualHost> | |
512 | # container, error messages relating to that virtual host will be | |
513 | # logged here. If you *do* define an error logfile for a <VirtualHost> | |
514 | # container, that host's errors will be logged there and not here. | |
515 | # | |
516 | ErrorLog /var/log/httpd/error_log | |
517 | ||
518 | # | |
519 | # LogLevel: Control the number of messages logged to the error_log. | |
520 | # Possible values include: debug, info, notice, warn, error, crit, | |
521 | # alert, emerg. | |
522 | # | |
523 | LogLevel warn | |
524 | ||
525 | # | |
526 | # The following directives define some format nicknames for use with | |
527 | # a CustomLog directive (see below). | |
528 | # | |
529 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | |
530 | LogFormat "%h %l %u %t \"%r\" %>s %b" common | |
531 | LogFormat "%{Referer}i -> %U" referer | |
532 | LogFormat "%{User-agent}i" agent | |
533 | ||
534 | # | |
535 | # The location and format of the access logfile (Common Logfile Format). | |
536 | # If you do not define any access logfiles within a <VirtualHost> | |
537 | # container, they will be logged here. Contrariwise, if you *do* | |
538 | # define per-<VirtualHost> access logfiles, transactions will be | |
539 | # logged therein and *not* in this file. | |
540 | # | |
541 | CustomLog /var/log/httpd/access_log common | |
542 | ||
543 | # | |
544 | # If you would like to have agent and referer logfiles, uncomment the | |
545 | # following directives. | |
546 | # | |
547 | CustomLog /var/log/httpd/referer_log referer | |
548 | CustomLog /var/log/httpd/agent_log agent | |
549 | ||
550 | # | |
551 | # If you prefer a single logfile with access, agent, and referer information | |
552 | # (Combined Logfile Format) you can use the following directive. | |
553 | # | |
554 | #CustomLog /var/log/httpd/access_log combined | |
555 | ||
556 | # | |
557 | # Optionally add a line containing the server version and virtual host | |
558 | # name to server-generated pages (error documents, FTP directory listings, | |
559 | # mod_status and mod_info output etc., but not CGI generated documents). | |
560 | # Set to "EMail" to also include a mailto: link to the ServerAdmin. | |
561 | # Set to one of: On | Off | EMail | |
562 | # | |
563 | ServerSignature Email | |
564 | ||
565 | # | |
566 | # Aliases: Add here as many aliases as you need (with no limit). The format is | |
567 | # Alias fakename realname | |
568 | # | |
569 | # Note that if you include a trailing / on fakename then the server will | |
570 | # require it to be present in the URL. So "/icons" isn't aliased in this | |
571 | # example, only "/icons/".. | |
572 | # | |
573 | Alias /icons/ "/home/httpd/icons/" | |
574 | ||
575 | <Directory "/home/httpd/icons"> | |
7ba668f5 | 576 | Options Indexes MultiViews |
577 | AllowOverride None | |
578 | Order allow,deny | |
579 | Allow from all | |
580 | /Directory> | |
4af76ed4 | 581 | |
582 | # | |
583 | # ScriptAlias: This controls which directories contain server scripts. | |
584 | # ScriptAliases are essentially the same as Aliases, except that | |
585 | # documents in the realname directory are treated as applications and | |
586 | # run by the server when requested rather than as documents sent to the client. | |
587 | # The same rules about trailing "/" apply to ScriptAlias directives as to | |
588 | # Alias. | |
589 | # | |
590 | ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/" | |
591 | ||
592 | # | |
593 | # "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased | |
594 | # CGI directory exists, if you have that configured. | |
595 | # | |
596 | <Directory "/home/httpd/cgi-bin"> | |
7ba668f5 | 597 | AllowOverride None |
598 | Options None | |
599 | Order allow,deny | |
600 | Allow from all | |
4af76ed4 | 601 | </Directory> |
602 | ||
603 | # | |
604 | # Redirect allows you to tell clients about documents which used to exist in | |
605 | # your server's namespace, but do not anymore. This allows you to tell the | |
606 | # clients where to look for the relocated document. | |
607 | # Format: Redirect old-URI new-URL | |
608 | # | |
609 | ||
610 | # | |
611 | # Directives controlling the display of server-generated directory listings. | |
612 | # | |
613 | ||
614 | # | |
615 | # FancyIndexing is whether you want fancy directory indexing or standard | |
616 | # | |
617 | IndexOptions FancyIndexing | |
618 | ||
619 | # | |
620 | # AddIcon* directives tell the server which icon to show for different | |
621 | # files or filename extensions. These are only displayed for | |
622 | # FancyIndexed directories. | |
623 | # | |
624 | AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip | |
625 | ||
626 | AddIconByType (TXT,/icons/text.gif) text/* | |
627 | AddIconByType (IMG,/icons/image2.gif) image/* | |
628 | AddIconByType (SND,/icons/sound2.gif) audio/* | |
629 | AddIconByType (VID,/icons/movie.gif) video/* | |
630 | ||
631 | AddIcon /icons/binary.gif .bin .exe | |
632 | AddIcon /icons/binhex.gif .hqx | |
633 | AddIcon /icons/tar.gif .tar | |
634 | AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv | |
635 | AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip | |
636 | AddIcon /icons/a.gif .ps .ai .eps | |
637 | AddIcon /icons/layout.gif .html .shtml .htm .pdf | |
638 | AddIcon /icons/text.gif .txt | |
639 | AddIcon /icons/c.gif .c | |
640 | AddIcon /icons/p.gif .pl .py | |
641 | AddIcon /icons/f.gif .for | |
642 | AddIcon /icons/dvi.gif .dvi | |
643 | AddIcon /icons/uuencoded.gif .uu | |
644 | AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl | |
645 | AddIcon /icons/tex.gif .tex | |
646 | AddIcon /icons/bomb.gif core | |
647 | ||
648 | AddIcon /icons/back.gif .. | |
649 | AddIcon /icons/hand.right.gif README | |
650 | AddIcon /icons/folder.gif ^^DIRECTORY^^ | |
651 | AddIcon /icons/blank.gif ^^BLANKICON^^ | |
652 | ||
653 | # | |
654 | # DefaultIcon is which icon to show for files which do not have an icon | |
655 | # explicitly set. | |
656 | # | |
657 | DefaultIcon /icons/unknown.gif | |
658 | ||
659 | # | |
660 | # AddDescription allows you to place a short description after a file in | |
661 | # server-generated indexes. These are only displayed for FancyIndexed | |
662 | # directories. | |
663 | # Format: AddDescription "description" filename | |
664 | # | |
665 | AddDescription "GZIP compressed document" .gz | |
666 | AddDescription "tar archive" .tar | |
667 | AddDescription "GZIP compressed tar archive" .tgz | |
668 | ||
669 | # | |
670 | # ReadmeName is the name of the README file the server will look for by | |
671 | # default, and append to directory listings. | |
672 | # | |
673 | # HeaderName is the name of a file which should be prepended to | |
674 | # directory indexes. | |
675 | # | |
676 | # The server will first look for name.html and include it if found. | |
677 | # If name.html doesn't exist, the server will then look for name.txt | |
678 | # and include it as plaintext if found. | |
679 | # | |
680 | ReadmeName README | |
681 | HeaderName HEADER | |
682 | ||
683 | # | |
684 | # IndexIgnore is a set of filenames which directory indexing should ignore | |
685 | # and not include in the listing. Shell-style wildcarding is permitted. | |
686 | # | |
687 | IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t | |
688 | ||
689 | # | |
690 | # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress | |
691 | # information on the fly. Note: Not all browsers support this. | |
692 | # Despite the name similarity, the following Add* directives have nothing | |
693 | # to do with the FancyIndexing customization directives above. | |
694 | # | |
695 | AddEncoding x-compress Z | |
696 | AddEncoding x-gzip gz | |
697 | ||
698 | # | |
699 | # AddLanguage allows you to specify the language of a document. You can | |
700 | # then use content negotiation to give a browser a file in a language | |
701 | # it can understand. Note that the suffix does not have to be the same | |
702 | # as the language keyword --- those with documents in Polish (whose | |
703 | # net-standard language code is pl) may wish to use "AddLanguage pl .po" | |
704 | # to avoid the ambiguity with the common suffix for perl scripts. | |
705 | # | |
706 | AddLanguage en .en | |
707 | AddLanguage fr .fr | |
708 | AddLanguage de .de | |
709 | AddLanguage da .da | |
710 | AddLanguage el .el | |
711 | AddLanguage it .it | |
712 | AddLanguage pl .po | |
713 | # | |
714 | # LanguagePriority allows you to give precedence to some languages | |
715 | # in case of a tie during content negotiation. | |
716 | # Just list the languages in decreasing order of preference. | |
717 | # | |
718 | LanguagePriority en pl fr de | |
719 | ||
720 | # | |
721 | # AddType allows you to tweak mime.types without actually editing it, or to | |
722 | # make certain files to be certain types. | |
723 | # | |
724 | # For example, the PHP3 module (not part of the Apache distribution - see | |
725 | # http://www.php.net) will typically use: | |
726 | # | |
727 | #AddType application/x-httpd-php3 .php3 | |
728 | #AddType application/x-httpd-php3-source .phps | |
729 | ||
730 | # | |
731 | # AddHandler allows you to map certain file extensions to "handlers", | |
732 | # actions unrelated to filetype. These can be either built into the server | |
733 | # or added with the Action command (see below) | |
734 | # | |
735 | # If you want to use server side includes, or CGI outside | |
736 | # ScriptAliased directories, uncomment the following lines. | |
737 | # | |
738 | # To use CGI scripts: | |
739 | # | |
740 | AddHandler cgi-script .cgi | |
741 | ||
742 | # | |
743 | # To use server-parsed HTML files | |
744 | # | |
745 | AddType text/html .shtml | |
746 | AddHandler server-parsed .shtml | |
747 | ||
748 | # | |
749 | # Uncomment the following line to enable Apache's send-asis HTTP file | |
750 | # feature | |
751 | # | |
752 | AddHandler send-as-is asis | |
753 | ||
754 | # | |
755 | # If you wish to use server-parsed imagemap files, use | |
756 | # | |
757 | AddHandler imap-file map | |
758 | ||
759 | # | |
760 | # To enable type maps, you might want to use | |
761 | # | |
762 | AddHandler type-map var | |
763 | ||
764 | # | |
765 | # Action lets you define media types that will execute a script whenever | |
766 | # a matching file is called. This eliminates the need for repeated URL | |
767 | # pathnames for oft-used CGI file processors. | |
768 | # Format: Action media/type /cgi-script/location | |
769 | # Format: Action handler-name /cgi-script/location | |
770 | # | |
771 | ||
772 | # | |
773 | # MetaDir: specifies the name of the directory in which Apache can find | |
774 | # meta information files. These files contain additional HTTP headers | |
775 | # to include when sending the document | |
776 | # | |
777 | MetaDir .web | |
778 | ||
779 | # | |
780 | # MetaSuffix: specifies the file name suffix for the file containing the | |
781 | # meta information. | |
782 | # | |
783 | MetaSuffix .meta | |
784 | ||
785 | # | |
786 | # Customizable error response (Apache style) | |
787 | # these come in three flavors | |
788 | # | |
789 | # 1) plain text | |
790 | #ErrorDocument 500 "The server made a boo boo. | |
791 | # n.b. the (") marks it as text, it does not get output | |
792 | # | |
793 | # 2) local redirects | |
794 | #ErrorDocument 404 /missing.html | |
795 | # to redirect to local URL /missing.html | |
796 | #ErrorDocument 404 /cgi-bin/missing_handler.pl | |
797 | # N.B.: You can redirect to a script or a document using server-side-includes. | |
798 | # | |
799 | # 3) external redirects | |
800 | #ErrorDocument 402 http://some.other_server.com/subscription_info.html | |
801 | # N.B.: Many of the environment variables associated with the original | |
802 | # request will *not* be available to such a script. | |
803 | ||
804 | # | |
805 | # The following directives modify normal HTTP response behavior. | |
806 | # The first directive disables keepalive for Netscape 2.x and browsers that | |
807 | # spoof it. There are known problems with these browser implementations. | |
808 | # The second directive is for Microsoft Internet Explorer 4.0b2 | |
809 | # which has a broken HTTP/1.1 implementation and does not properly | |
810 | # support keepalive when it is used on 301 or 302 (redirect) responses. | |
811 | # | |
812 | BrowserMatch "Mozilla/2" nokeepalive | |
813 | BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 | |
814 | ||
815 | # | |
816 | # The following directive disables HTTP/1.1 responses to browsers which | |
817 | # are in violation of the HTTP/1.0 spec by not being able to grok a | |
818 | # basic 1.1 response. | |
819 | # | |
820 | BrowserMatch "RealPlayer 4\.0" force-response-1.0 | |
821 | BrowserMatch "Java/1\.0" force-response-1.0 | |
822 | BrowserMatch "JDK/1\.0" force-response-1.0 | |
823 | ||
824 | Alias /errordocs/ "/home/httpd/errordocs/" | |
825 | ||
826 | ErrorDocument 400 /errordocs/400.shtml | |
827 | ErrorDocument 401 /errordocs/401.shtml | |
828 | ErrorDocument 403 /errordocs/403.shtml | |
829 | ErrorDocument 404 /errordocs/404.shtml | |
830 | ErrorDocument 405 /errordocs/405.shtml | |
831 | ErrorDocument 406 /errordocs/406.shtml | |
832 | ErrorDocument 408 /errordocs/408.shtml | |
833 | ErrorDocument 410 /errordocs/410.shtml | |
834 | ErrorDocument 411 /errordocs/411.shtml | |
835 | ErrorDocument 414 /errordocs/414.shtml | |
836 | ErrorDocument 500 /errordocs/500.shtml | |
837 | ErrorDocument 503 /errordocs/503.shtml | |
838 | ||
839 | # | |
840 | # Allow server status reports, with the URL of http://servername/server-status | |
841 | # Change the ".your_domain.com" to match your domain to enable. | |
842 | # | |
843 | #<Location /server-status> | |
7ba668f5 | 844 | # SetHandler server-status |
845 | # Order deny,allow | |
846 | # Deny from all | |
847 | # Allow from .your_domain.com | |
4af76ed4 | 848 | #</Location> |
849 | ||
850 | # | |
851 | # Allow remote server configuration reports, with the URL of | |
852 | # http://servername/server-info (requires that mod_info.c be loaded). | |
853 | # Change the ".your_domain.com" to match your domain to enable. | |
854 | # | |
855 | #<Location /server-info> | |
7ba668f5 | 856 | # SetHandler server-info |
857 | # Order deny,allow | |
858 | # Deny from all | |
859 | # Allow from .your_domain.com | |
4af76ed4 | 860 | #</Location> |
861 | ||
862 | # | |
863 | # There have been reports of people trying to abuse an old bug from pre-1.1 | |
864 | # days. This bug involved a CGI script distributed as a part of Apache. | |
865 | # By uncommenting these lines you can redirect these attacks to a logging | |
866 | # script on phf.apache.org. Or, you can record them yourself, using the script | |
867 | # support/phf_abuse_log.cgi. | |
868 | # | |
869 | #<Location /cgi-bin/phf*> | |
7ba668f5 | 870 | # Deny from all |
871 | # ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi | |
4af76ed4 | 872 | #</Location> |
873 | ||
874 | # | |
875 | # Proxy Server directives. Uncomment the following lines to | |
876 | # enable the proxy server: | |
877 | # | |
878 | #<IfModule mod_proxy.c> | |
879 | #ProxyRequests On | |
880 | # | |
881 | #<Directory proxy:*> | |
7ba668f5 | 882 | # Order deny,allow |
883 | # Deny from all | |
884 | # Allow from .your_domain.com | |
4af76ed4 | 885 | #</Directory> |
886 | ||
887 | # | |
888 | # Enable/disable the handling of HTTP/1.1 "Via:" headers. | |
889 | # ("Full" adds the server version; "Block" removes all outgoing Via: headers) | |
890 | # Set to one of: Off | On | Full | Block | |
891 | # | |
892 | #ProxyVia On | |
893 | ||
894 | # | |
895 | # To enable the cache as well, edit and uncomment the following lines: | |
896 | # (no cacheing without CacheRoot) | |
897 | # | |
898 | CacheRoot "/var/cache/www/apache" | |
899 | CacheSize 5 | |
900 | CacheGcInterval 4 | |
901 | CacheMaxExpire 24 | |
902 | CacheLastModifiedFactor 0.1 | |
903 | CacheDefaultExpire 1 | |
904 | #NoCache a_domain.com another_domain.edu joes.garage_sale.com | |
905 | ||
906 | #</IfModule> | |
907 | # End of proxy directives. | |
908 | ||
909 | ### Section 3: Virtual Hosts | |
910 | # | |
911 | # VirtualHost: If you want to maintain multiple domains/hostnames on your | |
912 | # machine you can setup VirtualHost containers for them. | |
913 | # Please see the documentation at <URL:http://www.apache.org/docs/vhosts/> | |
914 | # for further details before you try to setup virtual hosts. | |
915 | # You may use the command line option '-S' to verify your virtual host | |
916 | # configuration. | |
917 | ||
918 | # | |
919 | # If you want to use name-based virtual hosts you need to define at | |
920 | # least one IP address (and port number) for them. | |
921 | # | |
922 | #NameVirtualHost 12.34.56.78:80 | |
923 | #NameVirtualHost 12.34.56.78 | |
924 | ||
925 | Include /etc/httpd/virtual-host.conf |