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 # ServerRoot: The top of the directory tree under which the server's
44 # configuration, 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 # ScoreBoardFile: File used to store internal server process information.
68 # Not all architectures require this. But if yours does (you'll know because
69 # this file will be created when you run Apache) then you *must* ensure that
70 # no 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 /etc/httpd/srm.conf
84 AccessConfig /etc/httpd/access.conf
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 # Listen: Allows you to bind Apache to specific IP addresses and/or
130 # ports, in addition to the default. See also the <VirtualHost>
134 #Listen 12.34.56.78:80
137 # BindAddress: You can support virtual hosts with this option. This directive
138 # is used to tell the server which IP address to listen to. It can either
139 # contain "*", an IP address, or a fully qualified Internet domain name.
140 # See also the <VirtualHost> and Listen directives.
145 # ExtendedStatus controls whether Apache will generate "full" status
146 # information (ExtendedStatus On) or just basic information (ExtendedStatus
147 # Off) when the "server-status" handler is called. The default is Off.
151 ### Section 2: Dynamic Shared Object (DSO) Support
154 # LoadModule foo_module libexec/mod_foo.so
156 # Reconstruction of the complete module list from all available modules
157 # (static and shared ones) to achieve correct module execution order.
158 # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
162 ### Section 3: 'Main' server configuration
164 # The directives in this section set up the values used by the 'main'
165 # server, which responds to any requests that aren't handled by a
166 # <VirtualHost> definition. These values also provide defaults for
167 # any <VirtualHost> containers you may define later in the file.
169 # All of these directives may appear inside <VirtualHost> containers,
170 # in which case these default settings will be overridden for the
171 # virtual host being defined.
175 # If your ServerType directive (set earlier in the 'Global Environment'
176 # section) is set to "inetd", the next few directives don't have any
177 # effect since their settings are defined by the inetd configuration.
178 # Skip ahead to the ServerAdmin directive.
182 # Port: The port to which the standalone server listens. For
183 # ports < 1023, you will need httpd to be run as root initially.
188 # If you wish httpd to run as a different user or group, you must run
189 # httpd as root initially and it will switch.
191 # User/Group: The name (or #number) of the user/group to run httpd as.
192 # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
193 # . On HPUX you may not be able to use shared memory as nobody, and the
194 # suggested workaround is to create a user www and use that user.
195 # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
196 # when the value of (unsigned)Group is above 60000;
197 # don't use Group on these systems!
203 # ServerAdmin: Your address, where problems with the server should be
204 # e-mailed. This address appears on some server-generated pages, such
205 # as error documents.
207 ServerAdmin admin@your_domain.org
210 # ServerName allows you to set a host name which is sent back to clients for
211 # your server if it's different than the one the program would get (i.e., use
212 # "www" instead of the host's real name).
214 # Note: You cannot just invent host names and hope they work. The name you
215 # define here must be a valid DNS name for your host. If you don't understand
216 # this, ask your network administrator.
217 # If your host doesn't have a registered DNS name, enter its IP address here.
218 # You will have to access it by its address (e.g., http://123.45.67.89/)
219 # anyway, and this will make redirections work in a sensible way.
221 #ServerName new.host.name
224 # DocumentRoot: The directory out of which you will serve your
225 # documents. By default, all requests are taken from this directory, but
226 # symbolic links and aliases may be used to point to other locations.
228 DocumentRoot "/home/httpd/html"
231 # Each directory to which Apache has access, can be configured with respect
232 # to which services and features are allowed and/or disabled in that
233 # directory (and its subdirectories).
235 # First, we configure the "default" to be a very restrictive set of
239 Options FollowSymLinks
244 # Note that from this point forward you must specifically allow
245 # particular features to be enabled - so if something's not working as
246 # you might expect, make sure that you have specifically enabled it
251 # This should be changed to whatever you set DocumentRoot to.
253 <Directory "/home/httpd/html">
256 # This may also be "None", "All", or any combination of "Indexes",
257 # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
259 # Note that "MultiViews" must be named *explicitly* --- "Options All"
260 # doesn't give it to you.
262 Options Indexes FollowSymLinks
265 # This controls which options the .htaccess files in directories can
266 # override. Can also be "All", or any combination of "Options", "FileInfo",
267 # "AuthConfig", and "Limit"
272 # Controls who can get stuff from this server.
279 # UserDir: The name of the directory which is appended onto a user's home
280 # directory if a ~user request is received.
285 # Control access to UserDir directories. The following is an example
286 # for a site where these directories are restricted to read-only.
288 #<Directory /*/public_html>
289 # AllowOverride FileInfo AuthConfig Limit
290 # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
291 # <Limit GET POST OPTIONS PROPFIND>
295 # <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
302 # DirectoryIndex: Name of the file or files to use as a pre-written HTML
303 # directory index. Separate multiple entries with spaces.
305 DirectoryIndex index.html index.htm index.shtml index.cgi
308 # AccessFileName: The name of the file to look for in each directory
309 # for access control information.
311 AccessFileName .htaccess
314 # The following lines prevent .htaccess files from being viewed by
315 # Web clients. Since .htaccess files often contain authorization
316 # information, access is disallowed for security reasons. Comment
317 # these lines out if you want Web visitors to see the contents of
318 # .htaccess files. If you change the AccessFileName directive above,
319 # be sure to make the corresponding changes here.
327 # CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
328 # document that was negotiated on the basis of content. This asks proxy
329 # servers not to cache the document. Uncommenting the following line disables
330 # this behavior, and proxies will be allowed to cache the documents.
335 # UseCanonicalName: (new for 1.3) With this setting turned on, whenever
336 # Apache needs to construct a self-referencing URL (a URL that refers back
337 # to the server the response is coming from) it will use ServerName and
338 # Port to form a "canonical" name. With this setting off, Apache will
339 # use the hostname:port that the client supplied, when possible. This
340 # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
345 # TypesConfig describes where the mime.types file (or equivalent) is
346 # to be found. /etc/mime.types is provided by mailcap package.
348 TypesConfig /etc/mime.types
351 # DefaultType is the default MIME type the server will use for a document
352 # if it cannot otherwise determine one, such as from filename extensions.
353 # If your server contains mostly text or HTML documents, "text/plain" is
354 # a good value. If most of your content is binary, such as applications
355 # or images, you may want to use "application/octet-stream" instead to
356 # keep browsers from trying to display binary files as though they are
359 DefaultType text/plain
362 # The mod_mime_magic module allows the server to use various hints from the
363 # contents of the file itself to determine its type. The MIMEMagicFile
364 # directive tells the module where the hint definitions are located.
365 # mod_mime_magic is not part of the default server (you have to add
366 # it yourself with a LoadModule [see the DSO paragraph in the 'Global
367 # Environment' section], or recompile the server and include mod_mime_magic
368 # as part of the configuration), so it's enclosed in an <IfModule> container.
369 # This means that the MIMEMagicFile directive will only be processed if the
370 # module is part of the server.
372 <IfModule mod_mime_magic.c>
373 MIMEMagicFile /etc/httpd/magic
377 # HostnameLookups: Log the names of clients or just their IP addresses
378 # e.g., www.apache.org (on) or 204.62.129.132 (off).
379 # The default is off because it'd be overall better for the net if people
380 # had to knowingly turn this feature on, since enabling it means that
381 # each client request will result in AT LEAST one lookup request to the
387 # ErrorLog: The location of the error log file.
388 # If you do not specify an ErrorLog directive within a <VirtualHost>
389 # container, error messages relating to that virtual host will be
390 # logged here. If you *do* define an error logfile for a <VirtualHost>
391 # container, that host's errors will be logged there and not here.
393 ErrorLog /var/log/httpd/error_log
396 # LogLevel: Control the number of messages logged to the error_log.
397 # Possible values include: debug, info, notice, warn, error, crit,
403 # The following directives define some format nicknames for use with
404 # a CustomLog directive (see below).
406 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
407 LogFormat "%h %l %u %t \"%r\" %>s %b" common
408 LogFormat "%{Referer}i -> %U" referer
409 LogFormat "%{User-agent}i" agent
412 # The location and format of the access logfile (Common Logfile Format).
413 # If you do not define any access logfiles within a <VirtualHost>
414 # container, they will be logged here. Contrariwise, if you *do*
415 # define per-<VirtualHost> access logfiles, transactions will be
416 # logged therein and *not* in this file.
418 CustomLog /var/log/httpd/access_log common
421 # If you would like to have agent and referer logfiles, uncomment the
422 # following directives.
424 CustomLog /var/log/httpd/referer_log referer
425 CustomLog /var/log/httpd/agent_log agent
428 # If you prefer a single logfile with access, agent, and referer information
429 # (Combined Logfile Format) you can use the following directive.
431 #CustomLog /var/log/httpd/access_log combined
434 # Optionally add a line containing the server version and virtual host
435 # name to server-generated pages (error documents, FTP directory listings,
436 # mod_status and mod_info output etc., but not CGI generated documents).
437 # Set to "EMail" to also include a mailto: link to the ServerAdmin.
438 # Set to one of: On | Off | EMail
440 ServerSignature Email
443 # Aliases: Add here as many aliases as you need (with no limit). The format is
444 # Alias fakename realname
446 # Note that if you include a trailing / on fakename then the server will
447 # require it to be present in the URL. So "/icons" isn't aliased in this
448 # example, only "/icons/"..
450 Alias /icons/ "/home/httpd/icons/"
452 <Directory "/home/httpd/icons">
453 Options Indexes MultiViews
460 # ScriptAlias: This controls which directories contain server scripts.
461 # ScriptAliases are essentially the same as Aliases, except that
462 # documents in the realname directory are treated as applications and
463 # run by the server when requested rather than as documents sent to the client.
464 # The same rules about trailing "/" apply to ScriptAlias directives as to
467 ScriptAlias /cgi-bin/ "/home/httpd/cgi-bin/"
470 # "/home/httpd/cgi-bin" should be changed to whatever your ScriptAliased
471 # CGI directory exists, if you have that configured.
473 <Directory "/home/httpd/cgi-bin">
481 # Redirect allows you to tell clients about documents which used to exist in
482 # your server's namespace, but do not anymore. This allows you to tell the
483 # clients where to look for the relocated document.
484 # Format: Redirect old-URI new-URL
488 # Directives controlling the display of server-generated directory listings.
492 # FancyIndexing is whether you want fancy directory indexing or standard
494 IndexOptions FancyIndexing
497 # AddIcon* directives tell the server which icon to show for different
498 # files or filename extensions. These are only displayed for
499 # FancyIndexed directories.
501 AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
503 AddIconByType (TXT,/icons/text.gif) text/*
504 AddIconByType (IMG,/icons/image2.gif) image/*
505 AddIconByType (SND,/icons/sound2.gif) audio/*
506 AddIconByType (VID,/icons/movie.gif) video/*
508 AddIcon /icons/binary.gif .bin .exe
509 AddIcon /icons/binhex.gif .hqx
510 AddIcon /icons/tar.gif .tar
511 AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
512 AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
513 AddIcon /icons/a.gif .ps .ai .eps
514 AddIcon /icons/layout.gif .html .shtml .htm .pdf
515 AddIcon /icons/text.gif .txt
516 AddIcon /icons/c.gif .c
517 AddIcon /icons/p.gif .pl .py
518 AddIcon /icons/f.gif .for
519 AddIcon /icons/dvi.gif .dvi
520 AddIcon /icons/uuencoded.gif .uu
521 AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
522 AddIcon /icons/tex.gif .tex
523 AddIcon /icons/bomb.gif core
525 AddIcon /icons/back.gif ..
526 AddIcon /icons/hand.right.gif README
527 AddIcon /icons/folder.gif ^^DIRECTORY^^
528 AddIcon /icons/blank.gif ^^BLANKICON^^
531 # DefaultIcon is which icon to show for files which do not have an icon
534 DefaultIcon /icons/unknown.gif
537 # AddDescription allows you to place a short description after a file in
538 # server-generated indexes. These are only displayed for FancyIndexed
540 # Format: AddDescription "description" filename
542 AddDescription "GZIP compressed document" .gz
543 AddDescription "tar archive" .tar
544 AddDescription "GZIP compressed tar archive" .tgz
547 # ReadmeName is the name of the README file the server will look for by
548 # default, and append to directory listings.
550 # HeaderName is the name of a file which should be prepended to
553 # The server will first look for name.html and include it if found.
554 # If name.html doesn't exist, the server will then look for name.txt
555 # and include it as plaintext if found.
561 # IndexIgnore is a set of filenames which directory indexing should ignore
562 # and not include in the listing. Shell-style wildcarding is permitted.
564 IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
567 # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
568 # information on the fly. Note: Not all browsers support this.
569 # Despite the name similarity, the following Add* directives have nothing
570 # to do with the FancyIndexing customization directives above.
572 AddEncoding x-compress Z
573 AddEncoding x-gzip gz
576 # AddLanguage allows you to specify the language of a document. You can
577 # then use content negotiation to give a browser a file in a language
578 # it can understand. Note that the suffix does not have to be the same
579 # as the language keyword --- those with documents in Polish (whose
580 # net-standard language code is pl) may wish to use "AddLanguage pl .po"
581 # to avoid the ambiguity with the common suffix for perl scripts.
591 # LanguagePriority allows you to give precedence to some languages
592 # in case of a tie during content negotiation.
593 # Just list the languages in decreasing order of preference.
595 LanguagePriority en pl fr de
598 # AddHandler allows you to map certain file extensions to "handlers",
599 # actions unrelated to filetype. These can be either built into the server
600 # or added with the Action command (see below)
602 # If you want to use server side includes, or CGI outside
603 # ScriptAliased directories, uncomment the following lines.
605 # To use CGI scripts:
607 AddHandler cgi-script .cgi
610 # To use server-parsed HTML files
612 AddType text/html .shtml
613 AddHandler server-parsed .shtml
616 # Uncomment the following line to enable Apache's send-asis HTTP file
619 AddHandler send-as-is asis
622 # If you wish to use server-parsed imagemap files, use
624 AddHandler imap-file map
627 # To enable type maps, you might want to use
629 AddHandler type-map var
632 # Action lets you define media types that will execute a script whenever
633 # a matching file is called. This eliminates the need for repeated URL
634 # pathnames for oft-used CGI file processors.
635 # Format: Action media/type /cgi-script/location
636 # Format: Action handler-name /cgi-script/location
640 # MetaDir: specifies the name of the directory in which Apache can find
641 # meta information files. These files contain additional HTTP headers
642 # to include when sending the document
647 # MetaSuffix: specifies the file name suffix for the file containing the
653 # Customizable error response (Apache style)
654 # these come in three flavors
657 #ErrorDocument 500 "The server made a boo boo.
658 # n.b. the (") marks it as text, it does not get output
661 #ErrorDocument 404 /missing.html
662 # to redirect to local URL /missing.html
663 #ErrorDocument 404 /cgi-bin/missing_handler.pl
664 # N.B.: You can redirect to a script or a document using server-side-includes.
666 # 3) external redirects
667 #ErrorDocument 402 http://some.other_server.com/subscription_info.html
668 # N.B.: Many of the environment variables associated with the original
669 # request will *not* be available to such a script.
671 Alias /errordocs/ "/home/httpd/errordocs/"
673 ErrorDocument 400 /errordocs/400.shtml
674 ErrorDocument 401 /errordocs/401.shtml
675 ErrorDocument 403 /errordocs/403.shtml
676 ErrorDocument 404 /errordocs/404.shtml
677 ErrorDocument 405 /errordocs/405.shtml
678 ErrorDocument 406 /errordocs/406.shtml
679 ErrorDocument 408 /errordocs/408.shtml
680 ErrorDocument 410 /errordocs/410.shtml
681 ErrorDocument 411 /errordocs/411.shtml
682 ErrorDocument 414 /errordocs/414.shtml
683 ErrorDocument 500 /errordocs/500.shtml
684 ErrorDocument 503 /errordocs/503.shtml
686 # The following directives modify normal HTTP response behavior.
687 # The first directive disables keepalive for Netscape 2.x and browsers that
688 # spoof it. There are known problems with these browser implementations.
689 # The second directive is for Microsoft Internet Explorer 4.0b2
690 # which has a broken HTTP/1.1 implementation and does not properly
691 # support keepalive when it is used on 301 or 302 (redirect) responses.
693 BrowserMatch "Mozilla/2" nokeepalive
694 BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
697 # The following directive disables HTTP/1.1 responses to browsers which
698 # are in violation of the HTTP/1.0 spec by not being able to grok a
699 # basic 1.1 response.
701 BrowserMatch "RealPlayer 4\.0" force-response-1.0
702 BrowserMatch "Java/1\.0" force-response-1.0
703 BrowserMatch "JDK/1\.0" force-response-1.0
706 # Allow remote server configuration reports, with the URL of
707 # http://servername/server-info (requires that mod_info.c be loaded).
708 # Change the ".your_domain.com" to match your domain to enable.
710 #<Location /server-info>
711 # SetHandler server-info
714 # Allow from .your_domain.com
718 # There have been reports of people trying to abuse an old bug from pre-1.1
719 # days. This bug involved a CGI script distributed as a part of Apache.
720 # By uncommenting these lines you can redirect these attacks to a logging
721 # script on phf.apache.org. Or, you can record them yourself, using the script
722 # support/phf_abuse_log.cgi.
724 #<Location /cgi-bin/phf*>
726 # ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi