2 # This is the main Apache HTTP server configuration file. It contains the
3 # configuration directives that give the server its instructions.
4 # See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
6 # <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
7 # for a discussion of each configuration directive.
9 # Do NOT simply read the instructions in here without understanding
10 # what they do. They're here only as hints or reminders. If you are unsure
11 # consult the online docs. You have been warned.
13 # Configuration and logfile names: If the filenames you specify for many
14 # of the server's control files begin with "/" (or "drive:/" for Win32), the
15 # server will use that explicit path. If the filenames do *not* begin
16 # with "/", the value of ServerRoot is prepended -- so "/var/log/foo.log"
17 # with ServerRoot set to "/usr" will be interpreted by the
18 # server as "/usr//var/log/foo.log".
21 # ServerRoot: The top of the directory tree under which the server's
22 # configuration, error, and log files are kept.
24 # Do not add a slash at the end of the directory path. If you point
25 # ServerRoot at a non-local disk, be sure to point the LockFile directive
26 # at a local disk. If you wish to share the same ServerRoot for multiple
27 # httpd daemons, you will need to change at least LockFile and PidFile.
32 # Listen: Allows you to bind Apache to specific IP addresses and/or
33 # ports, instead of the default. See also the <VirtualHost>
36 # Change this to Listen on specific IP addresses as shown below to
37 # prevent Apache from glomming onto all bound IP addresses.
39 #Listen 12.34.56.78:80
43 # Dynamic Shared Object (DSO) Support
45 # To be able to use the functionality of a module which was built as a DSO you
46 # have to place corresponding `LoadModule' lines at this location so the
47 # directives contained in it are actually available _before_ they are used.
48 # Statically compiled modules (those listed by `httpd -l') do not need
52 # LoadModule foo_module modules/mod_foo.so
55 <IfModule !mpm_netware_module>
57 # If you wish httpd to run as a different user or group, you must run
58 # httpd as root initially and it will switch.
60 # User/Group: The name (or #number) of the user/group to run httpd as.
61 # It is usually good practice to create a dedicated user and group for
62 # running httpd, as with most system services.
68 # 'Main' server configuration
70 # The directives in this section set up the values used by the 'main'
71 # server, which responds to any requests that aren't handled by a
72 # <VirtualHost> definition. These values also provide defaults for
73 # any <VirtualHost> containers you may define later in the file.
75 # All of these directives may appear inside <VirtualHost> containers,
76 # in which case these default settings will be overridden for the
77 # virtual host being defined.
81 # ServerAdmin: Your address, where problems with the server should be
82 # e-mailed. This address appears on some server-generated pages, such
83 # as error documents. e.g. admin@your-domain.com
85 ServerAdmin you@example.com
88 # ServerName gives the name and port that the server uses to identify itself.
89 # This can often be determined automatically, but we recommend you specify
90 # it explicitly to prevent problems during startup.
92 # If your host doesn't have a registered DNS name, enter its IP address here.
94 #ServerName www.example.com:80
97 # DocumentRoot: The directory out of which you will serve your
98 # documents. By default, all requests are taken from this directory, but
99 # symbolic links and aliases may be used to point to other locations.
101 DocumentRoot "/usr/share/htdocs"
104 # Each directory to which Apache has access can be configured with respect
105 # to which services and features are allowed and/or disabled in that
106 # directory (and its subdirectories).
108 # First, we configure the "default" to be a very restrictive set of
112 Options FollowSymLinks
119 # Note that from this point forward you must specifically allow
120 # particular features to be enabled - so if something's not working as
121 # you might expect, make sure that you have specifically enabled it
126 # This should be changed to whatever you set DocumentRoot to.
128 <Directory "/usr/share/htdocs">
130 # Possible values for the Options directive are "None", "All",
131 # or any combination of:
132 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
134 # Note that "MultiViews" must be named *explicitly* --- "Options All"
135 # doesn't give it to you.
137 # The Options directive is both complicated and important. Please see
138 # http://httpd.apache.org/docs/2.2/mod/core.html#options
139 # for more information.
141 Options Indexes FollowSymLinks
144 # AllowOverride controls what directives may be placed in .htaccess files.
145 # It can be "All", "None", or any combination of the keywords:
146 # Options FileInfo AuthConfig Limit
151 # Controls who can get stuff from this server.
159 # DirectoryIndex: sets the file that Apache will serve if a directory
162 <IfModule dir_module>
163 DirectoryIndex index.html
167 # The following lines prevent .htaccess and .htpasswd files from being
168 # viewed by Web clients.
177 # ErrorLog: The location of the error log file.
178 # If you do not specify an ErrorLog directive within a <VirtualHost>
179 # container, error messages relating to that virtual host will be
180 # logged here. If you *do* define an error logfile for a <VirtualHost>
181 # container, that host's errors will be logged there and not here.
183 ErrorLog /var/log/error_log
186 # LogLevel: Control the number of messages logged to the error_log.
187 # Possible values include: debug, info, notice, warn, error, crit,
192 <IfModule log_config_module>
194 # The following directives define some format nicknames for use with
195 # a CustomLog directive (see below).
197 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
198 LogFormat "%h %l %u %t \"%r\" %>s %b" common
200 <IfModule logio_module>
201 # You need to enable mod_logio.c to use %I and %O
202 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
206 # The location and format of the access logfile (Common Logfile Format).
207 # If you do not define any access logfiles within a <VirtualHost>
208 # container, they will be logged here. Contrariwise, if you *do*
209 # define per-<VirtualHost> access logfiles, transactions will be
210 # logged therein and *not* in this file.
212 CustomLog /var/log/access_log common
215 # If you prefer a logfile with access, agent, and referer information
216 # (Combined Logfile Format) you can use the following directive.
218 #CustomLog /var/log/access_log combined
221 <IfModule alias_module>
223 # Redirect: Allows you to tell clients about documents that used to
224 # exist in your server's namespace, but do not anymore. The client
225 # will make a new request for the document at its new location.
227 # Redirect permanent /foo http://www.example.com/bar
230 # Alias: Maps web paths into filesystem paths and is used to
231 # access content that does not live under the DocumentRoot.
233 # Alias /webpath /full/filesystem/path
235 # If you include a trailing / on /webpath then the server will
236 # require it to be present in the URL. You will also likely
237 # need to provide a <Directory> section to allow access to
238 # the filesystem path.
241 # ScriptAlias: This controls which directories contain server scripts.
242 # ScriptAliases are essentially the same as Aliases, except that
243 # documents in the target directory are treated as applications and
244 # run by the server when requested rather than as documents sent to the
245 # client. The same rules about trailing "/" apply to ScriptAlias
246 # directives as to Alias.
248 ScriptAlias /cgi-bin/ "/usr/share/cgi-bin/"
252 <IfModule cgid_module>
254 # ScriptSock: On threaded servers, designate the path to the UNIX
255 # socket used to communicate with the CGI daemon of mod_cgid.
257 #Scriptsock /var/log/cgisock
261 # "/usr/share/cgi-bin" should be changed to whatever your ScriptAliased
262 # CGI directory exists, if you have that configured.
264 <Directory "/usr/share/cgi-bin">
272 # DefaultType: the default MIME type the server will use for a document
273 # if it cannot otherwise determine one, such as from filename extensions.
274 # If your server contains mostly text or HTML documents, "text/plain" is
275 # a good value. If most of your content is binary, such as applications
276 # or images, you may want to use "application/octet-stream" instead to
277 # keep browsers from trying to display binary files as though they are
280 DefaultType text/plain
282 <IfModule mime_module>
284 # TypesConfig points to the file containing the list of mappings from
285 # filename extension to MIME-type.
287 TypesConfig /etc/apache/mime.types
290 # AddType allows you to add to or override the MIME configuration
291 # file specified in TypesConfig for specific file types.
293 #AddType application/x-gzip .tgz
295 # AddEncoding allows you to have certain browsers uncompress
296 # information on the fly. Note: Not all browsers support this.
298 #AddEncoding x-compress .Z
299 #AddEncoding x-gzip .gz .tgz
301 # If the AddEncoding directives above are commented-out, then you
302 # probably should define those extensions to indicate media types:
304 AddType application/x-compress .Z
305 AddType application/x-gzip .gz .tgz
308 # AddHandler allows you to map certain file extensions to "handlers":
309 # actions unrelated to filetype. These can be either built into the server
310 # or added with the Action directive (see below)
312 # To use CGI scripts outside of ScriptAliased directories:
313 # (You will also need to add "ExecCGI" to the "Options" directive.)
315 #AddHandler cgi-script .cgi
317 # For type maps (negotiated resources):
318 #AddHandler type-map var
321 # Filters allow you to process content before it is sent to the client.
323 # To parse .shtml files for server-side includes (SSI):
324 # (You will also need to add "Includes" to the "Options" directive.)
326 #AddType text/html .shtml
327 #AddOutputFilter INCLUDES .shtml
331 # The mod_mime_magic module allows the server to use various hints from the
332 # contents of the file itself to determine its type. The MIMEMagicFile
333 # directive tells the module where the hint definitions are located.
335 MIMEMagicFile /etc/apache/magic
338 # Customizable error responses come in three flavors:
339 # 1) plain text 2) local redirects 3) external redirects
342 #ErrorDocument 500 "The server made a boo boo."
343 #ErrorDocument 404 /missing.html
344 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
345 #ErrorDocument 402 http://www.example.com/subscription_info.html
349 # EnableMMAP and EnableSendfile: On systems that support it,
350 # memory-mapping or the sendfile syscall is used to deliver
351 # files. This usually improves server performance, but must
352 # be turned off when serving from networked-mounted
353 # filesystems or if support for these functions is otherwise
354 # broken on your system.
359 # Supplemental configuration
361 # The configuration files in the /etc/apache/extra/ directory can be
362 # included to add extra features or to modify the default configuration of
363 # the server, or you may simply copy their contents here and change as
366 # Server-pool management (MPM specific)
367 ## Include /etc/apache/extra/httpd-mpm.conf
369 # Multi-language error messages
370 ## Include /etc/apache/extra/httpd-multilang-errordoc.conf
372 # Fancy directory listings
373 ## Include /etc/apache/extra/httpd-autoindex.conf
376 ## Include /etc/apache/extra/httpd-languages.conf
378 # User home directories
379 ## Include /etc/apache/extra/httpd-userdir.conf
381 # Real-time info on requests and configuration
382 ## Include /etc/apache/extra/httpd-info.conf
385 ## Include /etc/apache/extra/httpd-vhosts.conf
387 # Local access to the Apache HTTP Server Manual
388 ## Include /etc/apache/extra/httpd-manual.conf
390 # Distributed authoring and versioning (WebDAV)
391 ## Include /etc/apache/extra/httpd-dav.conf
393 # Various default settings
394 ## Include /etc/apache/extra/httpd-default.conf
396 # Secure (SSL/TLS) connections
397 ## Include /etc/apache/extra/httpd-ssl.conf
399 # Note: The following must must be present to support
400 # starting without SSL on platforms with no /dev/random equivalent
401 # but a statically compiled-in mod_ssl.
403 #<IfModule ssl_module>
404 #SSLRandomSeed startup builtin
405 #SSLRandomSeed connect builtin