source: branches/2.0/doc-expressolivre/debian/arqs-conf/etc/apache2/apache2.conf.lenny @ 2936

Revision 2936, 13.6 KB checked in by niltonneto, 14 years ago (diff)

Ticket #1107 - Reconfiguração do instalador do Apache e correção dos warnings.

Line 
1# Based upon the NCSA server configuration files originally by Rob McCool.
2# Changed extensively for the Debian package by Daniel Stone <daniel@sfarc.net>
3# and also by Thom May <thom@debian.org>.
4
5# ServerRoot: The top of the directory tree under which the server's
6# configuration, error, and log files are kept.
7#
8# NOTE!  If you intend to place this on an NFS (or otherwise network)
9# mounted filesystem then please read the LockFile documentation
10# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
11# you will save yourself a lot of trouble.
12
13ServerRoot "/etc/apache2"
14
15# The LockFile directive sets the path to the lockfile used when Apache
16# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
17# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
18# its default value. The main reason for changing it is if the logs
19# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
20# DISK. The PID of the main server process is automatically appended to
21# the filename.
22
23LockFile /var/lock/apache2/accept.lock
24
25# PidFile: The file in which the server should record its process
26# identification number when it starts.
27
28PidFile /var/run/apache2.pid
29
30# Timeout: The number of seconds before receives and sends time out.
31
32Timeout 60
33
34# KeepAlive: Whether or not to allow persistent connections (more than
35# one request per connection). Set to "Off" to deactivate.
36
37KeepAlive On
38
39# MaxKeepAliveRequests: The maximum number of requests to allow
40# during a persistent connection. Set to 0 to allow an unlimited amount.
41# We recommend you leave this number high, for maximum performance.
42
43MaxKeepAliveRequests 0
44
45# KeepAliveTimeout: Number of seconds to wait for the next request from the
46# same client on the same connection.
47
48KeepAliveTimeout 120
49
50##
51## Server-Pool Size Regulation (MPM specific)
52##
53
54# prefork MPM
55# StartServers ......... number of server processes to start
56# MinSpareServers ...... minimum number of server processes which are kept spare
57# MaxSpareServers ...... maximum number of server processes which are kept spare
58# MaxClients ........... maximum number of server processes allowed to start
59# MaxRequestsPerChild .. maximum number of requests a server process serves
60<IfModule prefork.c>
61ServerLimit          5000
62StartServers         2
63MinSpareServers      2
64MaxSpareServers      5
65MaxClients           3000
66MaxRequestsPerChild  0
67</IfModule>
68
69# pthread MPM
70# StartServers ......... initial  number of server processes to start
71# MaxClients ........... maximum  number of server processes allowed to start
72# MinSpareThreads ...... minimum  number of worker threads which are kept spare
73# MaxSpareThreads ...... maximum  number of worker threads which are kept spare
74# ThreadsPerChild ...... constant number of worker threads in each server process
75# MaxRequestsPerChild .. maximum  number of requests a server process serves
76<IfModule worker.c>
77StartServers         2
78MaxClients         150
79MinSpareThreads     25
80MaxSpareThreads     75
81ThreadsPerChild     25
82MaxRequestsPerChild  0
83</IfModule>
84
85# perchild MPM
86# NumServers ........... constant number of server processes
87# StartThreads ......... initial  number of worker threads in each server process
88# MinSpareThreads ...... minimum  number of worker threads which are kept spare
89# MaxSpareThreads ...... maximum  number of worker threads which are kept spare
90# MaxThreadsPerChild ... maximum  number of worker threads in each server process
91# MaxRequestsPerChild .. maximum  number of connections per server process (then it dies)
92<IfModule perchild.c>
93NumServers           5
94StartThreads         5
95MinSpareThreads      5
96MaxSpareThreads     10
97MaxThreadsPerChild  20
98MaxRequestsPerChild  0
99AcceptMutex fcntl
100</IfModule>
101
102User www-data
103Group www-data
104
105# The following directives define some format nicknames for use with
106# a CustomLog directive (see below).
107LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
108LogFormat "%h %l %u %t \"%r\" %>s %b" common
109LogFormat "%{Referer}i -> %U" referer
110LogFormat "%{User-agent}i" agent
111
112
113# Global error log.
114ErrorLog /var/log/apache2/error.log
115
116# Include module configuration:
117Include /etc/apache2/mods-enabled/*.load
118Include /etc/apache2/mods-enabled/*.conf
119
120# Include all the user configurations:
121Include /etc/apache2/httpd.conf
122
123# Include ports listing
124Include /etc/apache2/ports.conf
125
126# Include generic snippets of statements
127Include /etc/apache2/conf.d/[^.#]*
128
129# Set up the default error docs.
130#
131# Customizable error responses come in three flavors:
132# 1) plain text 2) local redirects 3) external redirects
133#
134# Some examples:
135#ErrorDocument 500 "The server made a boo boo."
136#ErrorDocument 404 /missing.html
137#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
138#ErrorDocument 402 http://www.example.com/subscription_info.html
139#
140
141#
142# Putting this all together, we can Internationalize error responses.
143#
144# We use Alias to redirect any /error/HTTP_<error>.html.var response to
145# our collection of by-error message multi-language collections.  We use
146# includes to substitute the appropriate text.
147#
148# You can modify the messages' appearance without changing any of the
149# default HTTP_<error>.html.var files by adding the line;
150#
151#   Alias /error/include/ "/your/include/path/"
152#
153# which allows you to create your own set of files by starting with the
154# /usr/local/apache2/error/include/ files and
155# copying them to /your/include/path/, even on a per-VirtualHost basis.
156#
157
158<IfModule mod_negotiation.c>
159<IfModule mod_include.c>
160    Alias /error/ "/usr/share/apache2/error/"
161
162    <Directory "/usr/share/apache2/error">
163        AllowOverride None
164        Options IncludesNoExec
165        AddOutputFilter Includes html
166        AddHandler type-map var
167        Order allow,deny
168        Allow from all
169        LanguagePriority en es de fr
170        ForceLanguagePriority Prefer Fallback
171    </Directory>
172
173    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
174    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
175    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
176    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
177    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
178    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
179    ErrorDocument 410 /error/HTTP_GONE.html.var
180    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
181    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
182    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
183    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
184    ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
185    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
186    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
187    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
188    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
189    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
190
191</IfModule>
192</IfModule>
193
194#<IfModule mod_security.c>
195#       AddHandler application/x-httpd-php .php
196#       SecAuditEngine On
197#       SecAuditLog /var/log/apache2/audit.log
198#       SecFilterScanPOST On
199#       SecFilterEngine On
200#       SecFilterDefaultAction "deny,log,status:500"
201#       SecFilter "<(.|\n)+>"
202#       SecFilter "'"
203#       SecFilter "\""
204#</IfModule>
205
206#<IfModule mod_security.c>
207        # Only inspect dynamic requests
208        # (YOU MUST TEST TO MAKE SURE IT WORKS AS EXPECTED)
209        # SecFilterEngine DynamicOnly
210#       SecFilterEngine On
211       
212        # Reject requests with status 500
213#       SecFilterDefaultAction "deny,log,status:403"
214
215        # Some sane defaults
216#       SecFilterScanPOST On
217#       SecFilterCheckURLEncoding On
218#       SecFilterCheckCookieFormat On
219#       SecFilterCheckUnicodeEncoding Off
220#       SecServerResponseToken Off
221
222        #If you want to scan the output, uncomment these
223        #SecFilterScanOutput On
224        #SecFilterOutputMimeTypes "(null) text/html text/plain"
225        # Accept almost all byte values
226#       SecFilterForceByteRange 1 255
227        # Server masking is optional
228        #fake server banner - NOYB used - no one needs to know what we are using
229#       SecServerSignature "NOYB"
230        #SecUploadDir /tmp
231        #SecUploadKeepFiles Off
232        # Only record the interesting stuff
233#       SecAuditEngine RelevantOnly
234#       SecAuditLog /var/log/apache2/audit.log
235        # You normally won't need debug logging
236#       SecFilterDebugLevel 0
237#       SecFilterDebugLog /var/log/apache2/modsec_debug_log
238        #And now, the rules
239        #Remove any of these Include lines you do not use or have rules for.
240        #Application protection rules
241#       Include /etc/apache2/modsecurity/rules.conf
242        #Comment spam rules
243#       Include /etc/apache2/modsecurity/blacklist.conf
244#</IfModule>
245
246#DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
247DirectoryIndex index.php index.html
248
249# UserDir is now a module
250#UserDir public_html
251#UserDir disabled root
252
253#<Directory /home/*/public_html>
254#       AllowOverride FileInfo AuthConfig Limit
255#       Options Indexes SymLinksIfOwnerMatch IncludesNoExec
256#</Directory>
257
258AccessFileName .htaccess
259
260<Files ~ "^\.ht">
261    Order allow,deny
262    Deny from all
263</Files>
264
265UseCanonicalName Off
266ServerSignature Off
267HostnameLookups Off
268ServerTokens Prod
269ScoreBoardFile /var/log/apache2/scoreboard.log
270
271TypesConfig /etc/mime.types
272DefaultType text/plain
273
274IndexOptions FancyIndexing VersionSort
275
276AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
277
278AddIconByType (TXT,/icons/text.gif) text/*
279AddIconByType (IMG,/icons/image2.gif) image/*
280AddIconByType (SND,/icons/sound2.gif) audio/*
281AddIconByType (VID,/icons/movie.gif) video/*
282
283# This really should be .jpg.
284
285AddIcon /icons/binary.gif .bin .exe
286AddIcon /icons/binhex.gif .hqx
287AddIcon /icons/tar.gif .tar
288AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
289AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
290AddIcon /icons/a.gif .ps .ai .eps
291AddIcon /icons/layout.gif .html .shtml .htm .pdf
292AddIcon /icons/text.gif .txt
293AddIcon /icons/c.gif .c
294AddIcon /icons/p.gif .pl .py
295AddIcon /icons/f.gif .for
296AddIcon /icons/dvi.gif .dvi
297AddIcon /icons/uuencoded.gif .uu
298AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
299AddIcon /icons/tex.gif .tex
300AddIcon /icons/bomb.gif core
301
302AddIcon /icons/back.gif ..
303AddIcon /icons/hand.right.gif README
304AddIcon /icons/folder.gif ^^DIRECTORY^^
305AddIcon /icons/blank.gif ^^BLANKICON^^
306
307
308# This is from Matty J's patch. Anyone want to make the icons?
309#AddIcon /icons/dirsymlink.jpg ^^SYMDIR^^
310#AddIcon /icons/symlink.jpg ^^SYMLINK^^
311
312DefaultIcon /icons/unknown.gif
313
314ReadmeName README.html
315HeaderName HEADER.html
316
317IndexIgnore .??* *~ *# HEADER* RCS CVS *,t
318
319AddEncoding x-compress Z
320AddEncoding x-gzip gz tgz
321
322AddLanguage da .dk
323AddLanguage nl .nl
324AddLanguage en .en
325AddLanguage et .et
326AddLanguage fr .fr
327AddLanguage de .de
328AddLanguage el .el
329AddLanguage it .it
330AddLanguage ja .ja
331AddLanguage pl .po
332AddLanguage ko .ko
333AddLanguage pt .pt
334AddLanguage no .no
335AddLanguage pt-br .pt-br
336AddLanguage ltz .ltz
337AddLanguage ca .ca
338AddLanguage es .es
339AddLanguage sv .se
340AddLanguage cz .cz
341AddLanguage ru .ru
342AddLanguage tw .tw
343AddLanguage zh-tw .tw
344
345LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
346
347
348AddDefaultCharset       iso-8859-1
349
350AddCharset ISO-8859-1  .iso8859-1  .latin1
351AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
352AddCharset ISO-8859-3  .iso8859-3  .latin3
353AddCharset ISO-8859-4  .iso8859-4  .latin4
354AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
355AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
356AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
357AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
358AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
359AddCharset ISO-2022-JP .iso2022-jp .jis
360AddCharset ISO-2022-KR .iso2022-kr .kis
361AddCharset ISO-2022-CN .iso2022-cn .cis
362AddCharset Big5        .Big5       .big5
363# For russian, more than one charset is used (depends on client, mostly):
364AddCharset WINDOWS-1251 .cp-1251   .win-1251
365AddCharset CP866       .cp866
366AddCharset KOI8-r      .koi8-r .koi8-ru
367AddCharset KOI8-ru     .koi8-uk .ua
368AddCharset ISO-10646-UCS-2 .ucs2
369AddCharset ISO-10646-UCS-4 .ucs4
370AddCharset UTF-8       .utf8
371
372AddCharset GB2312      .gb2312 .gb
373AddCharset utf-7       .utf7
374AddCharset utf-8       .utf8
375AddCharset big5        .big5 .b5
376AddCharset EUC-TW      .euc-tw 
377AddCharset EUC-JP      .euc-jp
378AddCharset EUC-KR      .euc-kr
379AddCharset shift_jis   .sjis
380
381#AddType application/x-httpd-php .php
382#AddType application/x-httpd-php-source .phps
383
384AddType application/x-tar .tgz
385
386# To use CGI scripts outside /cgi-bin/:
387#
388#AddHandler cgi-script .cgi
389
390# To use server-parsed HTML files
391#
392<FilesMatch "\.shtml(\..+)?$">
393    SetOutputFilter INCLUDES
394</FilesMatch>
395
396# If you wish to use server-parsed imagemap files, use
397#
398#AddHandler imap-file map
399
400BrowserMatch "Mozilla/2" nokeepalive
401BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
402BrowserMatch "RealPlayer 4\.0" force-response-1.0
403BrowserMatch "Java/1\.0" force-response-1.0
404BrowserMatch "JDK/1\.0" force-response-1.0
405
406#
407# The following directive disables redirects on non-GET requests for
408# a directory that does not include the trailing slash.  This fixes a
409# problem with Microsoft WebFolders which does not appropriately handle
410# redirects for folders with DAV methods.
411#
412
413BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
414BrowserMatch "^WebDrive" redirect-carefully
415BrowserMatch "^gnome-vfs" redirect-carefully
416BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
417
418# Allow server status reports, with the URL of http://servername/server-status
419# Change the ".your_domain.com" to match your domain to enable.
420#
421#<Location /server-status>
422#    SetHandler server-status
423#    Order deny,allow
424#    Deny from all
425#    Allow from 10.15.20.30
426#</Location>
427
428# Allow remote server configuration reports, with the URL of
429#  http://servername/server-info (requires that mod_info.c be loaded).
430# Change the ".your_domain.com" to match your domain to enable.
431#
432#<Location /server-info>
433#    SetHandler server-info
434#    Order deny,allow
435#    Deny from all
436#    Allow from .your_domain.com
437#</Location>
438
439# Include the virtual host configurations:
440Include /etc/apache2/sites-enabled/[^.#]*
441
Note: See TracBrowser for help on using the repository browser.