2 ## httpd.conf -- Apache HTTP server configuration file
5 ##### Global Environment
6 # The directives in this section affect the overall operation of Apache,
7 # such as the number of concurrent requests it can handle or where it can
8 # find its configuration files.
11 # is either inetd, or standalone. Inetd mode is only supported on Unix
17 # The file in which the server should record its process identification
18 # number when it starts.
20 PidFile /var/run/httpd.pid
23 # The number of seconds before receives and sends time out.
25 # Number of seconds to wait for the next request from the same client on the
32 # Whether or not to allow persistent connections (more than one request per
33 # connection). Set to "Off" to deactivate.
34 ### MaxKeepAliveRequests
35 # The maximum number of requests to allow during a persistent connection.
36 # Set to 0 to allow an unlimited amount. We recommend you leave this number
37 # high, for maximum performance.
40 MaxKeepAliveRequests 100
43 # The top of the directory tree under which the server's configuration,
44 # error, and log files are kept.
46 # NOTE! If you intend to place this on an NFS (or otherwise network)
47 # mounted filesystem then please read the LockFile documentation
48 # (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
49 # you will save yourself a lot of trouble.
51 # Do NOT add a slash at the end of the directory path.
56 # The LockFile directive sets the path to the lockfile used when Apache
57 # is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
58 # USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
59 # its default value. The main reason for changing it is if the logs
60 # directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
61 # DISK. The PID of the main server process is automatically appended to
64 LockFile /var/run/httpd.lock
67 # File used to store internal server process information.
68 # architectures require this. But if yours does (you'll know because this
69 # file will be created when you run Apache) then you *must* ensure that no
70 # two invocations of Apache share the same scoreboard file.
72 ScoreBoardFile /var/run/httpd.scoreboard
75 # In the standard configuration, the server will process this file,
76 # srm.conf, and access.conf in that order. The latter two files are
77 # now distributed empty, as it is recommended that all directives
78 # be kept in a single file for simplicity. The commented-out values
79 # below are the built-in defaults. You can have the server ignore
80 # these files altogether by using "/dev/null" (for Unix) or
81 # "nul" (for Win32) for the arguments to the directives.
83 ResourceConfig /dev/null
84 AccessConfig /dev/null
88 # Server-pool size regulation. Rather than making you guess how many
89 # server processes you need, Apache dynamically adapts to the load it
90 # sees --- that is, it tries to maintain enough server processes to
91 # handle the current load, plus a few spare servers to handle transient
92 # load spikes (e.g., multiple simultaneous requests from a single
95 # It does this by periodically checking how many servers are waiting
96 # for a request. If there are fewer than MinSpareServers, it creates
97 # a new spare. If there are more than MaxSpareServers, some of the
98 # spares die off. The default values are probably OK for most sites.
104 # Number of servers to start initially --- should be a reasonable ballpark
110 # Limit on total number of servers running, i.e., limit on the number
111 # of clients who can simultaneously connect --- if this limit is ever
112 # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
113 # It is intended mainly as a brake to keep a runaway server from taking
114 # the system with it as it spirals down...
119 # MaxRequestsPerChild: the number of requests each child process is
120 # allowed to process before the child dies. The child will exit so
121 # as to avoid problems after prolonged use when Apache (and maybe the
122 # libraries it uses) leak memory or other resources. On most systems, this
123 # isn't really needed, but a few (such as Solaris) do have notable leaks
126 MaxRequestsPerChild 30
129 # Allows you to bind Apache to specific IP addresses and/or ports, in
130 # addition to the default. See also the <VirtualHost> directive.
132 #Listen 12.34.56.78:80
136 # You can support virtual hosts with this option. This directive is used to
137 # tell the server which IP address to listen to. It can either contain "*",
138 # an IP address, or a fully qualified Internet domain name. See also the
139 # <VirtualHost> and Listen directives.
144 # controls whether Apache will generate "full" status information
145 # (ExtendedStatus On) or just basic information (ExtendedStatus Off) when
146 # the "server-status" handler is called. The default is Off.
150 ### Section 2: Dynamic Shared Object (DSO) Support
153 # LoadModule foo_module libexec/mod_foo.so
155 # Reconstruction of the complete module list from all available modules
156 # (static and shared ones) to achieve correct module execution order.
157 # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
161 ### Section 3: 'Main' server configuration
163 # The directives in this section set up the values used by the 'main'
164 # server, which responds to any requests that aren't handled by a
165 # <VirtualHost> definition. These values also provide defaults for
166 # any <VirtualHost> containers you may define later in the file.
168 # All of these directives may appear inside <VirtualHost> containers,
169 # in which case these default settings will be overridden for the
170 # virtual host being defined.
174 # If your ServerType directive (set earlier in the 'Global Environment'
175 # section) is set to "inetd", the next few directives don't have any
176 # effect since their settings are defined by the inetd configuration.
177 # Skip ahead to the ServerAdmin directive.
181 # Port: The port to which the standalone server listens. For
182 # ports < 1023, you will need httpd to be run as root initially.
187 # If you wish httpd to run as a different user or group, you must run
188 # httpd as root initially and it will switch.
194 # ServerAdmin: Your address, where problems with the server should be
195 # e-mailed. This address appears on some server-generated pages, such
196 # as error documents.
198 ServerAdmin admin@your_domain.org
201 # ServerName allows you to set a host name which is sent back to clients for
202 # your server if it's different than the one the program would get (i.e., use
203 # "www" instead of the host's real name).
205 # Note: You cannot just invent host names and hope they work. The name you
206 # define here must be a valid DNS name for your host. If you don't understand
207 # this, ask your network administrator.
208 # If your host doesn't have a registered DNS name, enter its IP address here.
209 # You will have to access it by its address (e.g., http://123.45.67.89/)
210 # anyway, and this will make redirections work in a sensible way.
212 #ServerName new.host.name
215 # DocumentRoot: The directory out of which you will serve your
216 # documents. By default, all requests are taken from this directory, but
217 # symbolic links and aliases may be used to point to other locations.
219 DocumentRoot "/home/httpd/html"
222 # Each directory to which Apache has access, can be configured with respect
223 # to which services and features are allowed and/or disabled in that
224 # directory (and its subdirectories).
226 # First, we configure the "default" to be a very restrictive set of
230 Options FollowSymLinks
235 # Note that from this point forward you must specifically allow
236 # particular features to be enabled - so if something's not working as
237 # you might expect, make sure that you have specifically enabled it
242 # This should be changed to whatever you set DocumentRoot to.
244 <Directory "/home/httpd/html">
247 # This may also be "None", "All", or any combination of "Indexes",
248 # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
250 # Note that "MultiViews" must be named *explicitly* --- "Options All"
251 # doesn't give it to you.
253 Options Indexes FollowSymLinks
256 # This controls which options the .htaccess files in directories can
257 # override. Can also be "All", or any combination of "Options", "FileInfo",
258 # "AuthConfig", and "Limit"
263 # Controls who can get stuff from this server.
270 # UserDir: The name of the directory which is appended onto a user's home
271 # directory if a ~user request is received.
276 # Control access to UserDir directories. The following is an example
277 # for a site where these directories are restricted to read-only.
279 #<Directory /*/public_html>
280 # AllowOverride FileInfo AuthConfig Limit
281 # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
282 # <Limit GET POST OPTIONS PROPFIND>
286 # <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
293 # DirectoryIndex: Name of the file or files to use as a pre-written HTML
294 # directory index. Separate multiple entries with spaces.
297 DirectoryIndex index.html index.htm index.shtml index.cgi index.php
301 # AccessFileName: The name of the file to look for in each directory
302 # for access control information.
304 AccessFileName .htaccess
307 # The following lines prevent .htaccess files from being viewed by
308 # Web clients. Since .htaccess files often contain authorization
309 # information, access is disallowed for security reasons. Comment
310 # these lines out if you want Web visitors to see the contents of
311 # .htaccess files. If you change the AccessFileName directive above,
312 # be sure to make the corresponding changes here.
320 # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
321 # document that was negotiated on the basis of content. This asks proxy
322 # servers not to cache the document. Uncommenting the following line disables
323 # this behavior, and proxies will be allowed to cache the documents.
328 # UseCanonicalName: (new for 1.3) With this setting turned on, whenever
329 # Apache needs to construct a self-referencing URL (a URL that refers back
330 # to the server the response is coming from) it will use ServerName and
331 # Port to form a "canonical" name. With this setting off, Apache will
332 # use the hostname:port that the client supplied, when possible. This
333 # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
338 # TypesConfig describes where the mime.types file (or equivalent) is
339 # to be found. /etc/mime.types is provided by mailcap package.
341 TypesConfig /etc/mime.types
344 # DefaultType is the default MIME type the server will use for a document
345 # if it cannot otherwise determine one, such as from filename extensions.
346 # If your server contains mostly text or HTML documents, "text/plain" is
347 # a good value. If most of your content is binary, such as applications
348 # or images, you may want to use "application/octet-stream" instead to
349 # keep browsers from trying to display binary files as though they are
352 DefaultType text/plain
355 # The mod_mime_magic module allows the server to use various hints from the
356 # contents of the file itself to determine its type. The MIMEMagicFile
357 # directive tells the module where the hint definitions are located.
358 # mod_mime_magic is not part of the default server (you have to add
359 # it yourself with a LoadModule [see the DSO paragraph in the 'Global
360 # Environment' section], or recompile the server and include mod_mime_magic
361 # as part of the configuration), so it's enclosed in an <IfModule> container.
362 # This means that the MIMEMagicFile directive will only be processed if the
363 # module is part of the server.
365 <IfModule mod_mime_magic.c>
366 MIMEMagicFile /etc/httpd/magic
370 # HostnameLookups: Log the names of clients or just their IP addresses
371 # e.g., www.apache.org (on) or 204.62.129.132 (off).
372 # The default is off because it'd be overall better for the net if people
373 # had to knowingly turn this feature on, since enabling it means that
374 # each client request will result in AT LEAST one lookup request to the
380 # The following directives define some format nicknames for use with
381 # a CustomLog directive (see below).
383 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
384 LogFormat "%h %l %u %t \"%r\" %>s %b" common
385 LogFormat "%{Referer}i -> %U" referer
386 LogFormat "%{User-agent}i" agent
389 # ErrorLog: The location of the error log file.
390 # If you do not specify an ErrorLog directive within a <VirtualHost>
391 # container, error messages relating to that virtual host will be
392 # logged here. If you *do* define an error logfile for a <VirtualHost>
393 # container, that host's errors will be logged there and not here.
395 ErrorLog /var/log/httpd/error_log
397 # The location and format of the access logfile (Common Logfile Format).
398 # If you do not define any access logfiles within a <VirtualHost>
399 # container, they will be logged here. Contrariwise, if you *do*
400 # define per-<VirtualHost> access logfiles, transactions will be
401 # logged therein and *not* in this file.
403 CustomLog /var/log/httpd/access_log common
404 CustomLog /var/log/httpd/referer_log referer
405 CustomLog /var/log/httpd/agent_log agent
408 # LogLevel: Control the number of messages logged to the error_log.
409 # Possible values include: debug, info, notice, warn, error, crit,
415 # Optionally add a line containing the server version and virtual host
416 # name to server-generated pages (error documents, FTP directory listings,
417 # mod_status and mod_info output etc., but not CGI generated documents).
418 # Set to "EMail" to also include a mailto: link to the ServerAdmin.
419 # Set to one of: On | Off | EMail
421 ServerSignature Email
424 # Aliases: Add here as many aliases as you need (with no limit). The format is
425 # Alias fakename realname
427 # Note that if you include a trailing / on fakename then the server will
428 # require it to be present in the URL. So "/icons" isn't aliased in this
429 # example, only "/icons/"..
431 Alias /icons/ "/home/httpd/icons/"
433 <Directory "/home/httpd/icons">
434 Options Indexes MultiViews
441 # ScriptAlias: This controls which directories contain server scripts.
442 # ScriptAliases are essentially the same as Aliases, except that
443 # documents in the realname directory are treated as applications and
444 # run by the server when requested rather than as documents sent to the client.
445 # The same rules about trailing "/" apply to ScriptAlias directives as to
448 ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"
451 # "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased
452 # CGI directory exists, if you have that configured.
454 <Directory "/home/httpd/cgi-bin">
462 # Redirect allows you to tell clients about documents which used to exist in
463 # your server's namespace, but do not anymore. This allows you to tell the
464 # clients where to look for the relocated document.
465 # Format: Redirect old-URI new-URL
469 # Directives controlling the display of server-generated directory listings.
473 # FancyIndexing is whether you want fancy directory indexing or standard
475 IndexOptions FancyIndexing
478 # AddIcon* directives tell the server which icon to show for different
479 # files or filename extensions. These are only displayed for
480 # FancyIndexed directories.
482 AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
484 AddIconByType (TXT,/icons/text.gif) text/*
485 AddIconByType (IMG,/icons/image2.gif) image/*
486 AddIconByType (SND,/icons/sound2.gif) audio/*
487 AddIconByType (VID,/icons/movie.gif) video/*
489 AddIcon /icons/binary.gif .bin .exe
490 AddIcon /icons/binhex.gif .hqx
491 AddIcon /icons/tar.gif .tar
492 AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
493 AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
494 AddIcon /icons/a.gif .ps .ai .eps
495 AddIcon /icons/layout.gif .html .shtml .htm .pdf
496 AddIcon /icons/text.gif .txt
497 AddIcon /icons/c.gif .c
498 AddIcon /icons/p.gif .pl .py
499 AddIcon /icons/f.gif .for
500 AddIcon /icons/dvi.gif .dvi
501 AddIcon /icons/uuencoded.gif .uu
502 AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
503 AddIcon /icons/tex.gif .tex
504 AddIcon /icons/bomb.gif core
506 AddIcon /icons/back.gif ..
507 AddIcon /icons/hand.right.gif README
508 AddIcon /icons/folder.gif ^^DIRECTORY^^
509 AddIcon /icons/blank.gif ^^BLANKICON^^
512 # DefaultIcon is which icon to show for files which do not have an icon
515 DefaultIcon /icons/unknown.gif
518 # AddDescription allows you to place a short description after a file in
519 # server-generated indexes. These are only displayed for FancyIndexed
521 # Format: AddDescription "description" filename
523 AddDescription "GZIP compressed document" .gz
524 AddDescription "tar archive" .tar
525 AddDescription "GZIP compressed tar archive" .tgz
528 # ReadmeName is the name of the README file the server will look for by
529 # default, and append to directory listings.
531 # HeaderName is the name of a file which should be prepended to
534 # The server will first look for name.html and include it if found.
535 # If name.html doesn't exist, the server will then look for name.txt
536 # and include it as plaintext if found.
542 # IndexIgnore is a set of filenames which directory indexing should ignore
543 # and not include in the listing. Shell-style wildcarding is permitted.
545 IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
548 # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
549 # information on the fly. Note: Not all browsers support this.
550 # Despite the name similarity, the following Add* directives have nothing
551 # to do with the FancyIndexing customization directives above.
553 AddEncoding x-compress Z
554 AddEncoding x-gzip gz
557 # AddLanguage allows you to specify the language of a document. You can
558 # then use content negotiation to give a browser a file in a language
559 # it can understand. Note that the suffix does not have to be the same
560 # as the language keyword --- those with documents in Polish (whose
561 # net-standard language code is pl) may wish to use "AddLanguage pl .po"
562 # to avoid the ambiguity with the common suffix for perl scripts.
572 # LanguagePriority allows you to give precedence to some languages
573 # in case of a tie during content negotiation.
574 # Just list the languages in decreasing order of preference.
576 LanguagePriority en pl fr de
579 # AddHandler allows you to map certain file extensions to "handlers",
580 # actions unrelated to filetype. These can be either built into the server
581 # or added with the Action command (see below)
583 # If you want to use server side includes, or CGI outside
584 # ScriptAliased directories, uncomment the following lines.
586 # To use CGI scripts:
588 AddHandler cgi-script .cgi
591 # To use server-parsed HTML files
593 AddType text/html .shtml
594 AddHandler server-parsed .shtml
597 # Uncomment the following line to enable Apache's send-asis HTTP file
600 AddHandler send-as-is asis
603 # If you wish to use server-parsed imagemap files, use
605 AddHandler imap-file map
608 # To enable type maps, you might want to use
610 AddHandler type-map var
613 # Action lets you define media types that will execute a script whenever
614 # a matching file is called. This eliminates the need for repeated URL
615 # pathnames for oft-used CGI file processors.
616 # Format: Action media/type /cgi-script/location
617 # Format: Action handler-name /cgi-script/location
621 # MetaDir: specifies the name of the directory in which Apache can find
622 # meta information files. These files contain additional HTTP headers
623 # to include when sending the document
628 # MetaSuffix: specifies the file name suffix for the file containing the
634 # Customizable error response (Apache style)
635 # these come in three flavors
638 #ErrorDocument 500 "The server made a boo boo.
639 # n.b. the (") marks it as text, it does not get output
642 #ErrorDocument 404 /missing.html
643 # to redirect to local URL /missing.html
644 #ErrorDocument 404 /cgi-bin/missing_handler.pl
645 # N.B.: You can redirect to a script or a document using server-side-includes.
647 # 3) external redirects
648 #ErrorDocument 402 http://some.other_server.com/subscription_info.html
649 # N.B.: Many of the environment variables associated with the original
650 # request will *not* be available to such a script.
652 Alias /errordocs/ "/home/httpd/errordocs/"
654 <Directory /home/httpd/errordocs/>
656 Options IncludesNoExec FollowSymLinks
659 ErrorDocument 400 /errordocs/400.shtml
660 ErrorDocument 401 /errordocs/401.shtml
661 ErrorDocument 403 /errordocs/403.shtml
662 ErrorDocument 404 /errordocs/404.shtml
663 ErrorDocument 405 /errordocs/405.shtml
664 ErrorDocument 406 /errordocs/406.shtml
665 ErrorDocument 408 /errordocs/408.shtml
666 ErrorDocument 410 /errordocs/410.shtml
667 ErrorDocument 411 /errordocs/411.shtml
668 ErrorDocument 414 /errordocs/414.shtml
669 ErrorDocument 500 /errordocs/500.shtml
670 ErrorDocument 503 /errordocs/503.shtml
672 # The following directives modify normal HTTP response behavior.
673 # The first directive disables keepalive for Netscape 2.x and browsers that
674 # spoof it. There are known problems with these browser implementations.
675 # The second directive is for Microsoft Internet Explorer 4.0b2
676 # which has a broken HTTP/1.1 implementation and does not properly
677 # support keepalive when it is used on 301 or 302 (redirect) responses.
679 BrowserMatch "Mozilla/2" nokeepalive
680 BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
683 # The following directive disables HTTP/1.1 responses to browsers which
684 # are in violation of the HTTP/1.0 spec by not being able to grok a
685 # basic 1.1 response.
687 BrowserMatch "RealPlayer 4\.0" force-response-1.0
688 BrowserMatch "Java/1\.0" force-response-1.0
689 BrowserMatch "JDK/1\.0" force-response-1.0
692 # Allow remote server configuration reports, with the URL of
693 # http://servername/server-info (requires that mod_info.c be loaded).
694 # Change the ".your_domain.com" to match your domain to enable.
696 #<Location /server-info>
697 # SetHandler server-info
700 # Allow from .your_domain.com
704 # There have been reports of people trying to abuse an old bug from pre-1.1
705 # days. This bug involved a CGI script distributed as a part of Apache.
706 # By uncommenting these lines you can redirect these attacks to a logging
707 # script on phf.apache.org. Or, you can record them yourself, using the script
708 # support/phf_abuse_log.cgi.
710 #<Location /cgi-bin/phf*>
712 # ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi