TracUtil: httpd.conf

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