-httpd.conf-

 
httpd.conf 追加、修正

ピンク色文字
はPHP4を導入するにあたって 私が 追加、修正したところです。
Apache2系は 若干 httpd.confが変わっています。
最初 ブラウザでの表示で文字化けするのに戸惑いました^^;
  795 行目 AddDefaultCharset Off に変更が必須のようです。
パッケージから入れたものと ソースから落としたものでは DocumentRootも違います。
Vineに標準装備のWebminでApacheの設定をすると このファイルの最下位部に
一括で設定内容を書き込む様です。
--------------------------------------------------------------------
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/foo.log".
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
36 # can find its configuration files.
37 #
38
39 #
40 # ServerRoot: The top of the directory tree under which the server's
41 # configuration, error, and log files are kept.
42 #
43 # NOTE! If you intend to place this on an NFS (or otherwise network)
44 # mounted filesystem then please read the LockFile documentation (available
45 # at <URL:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
46 # you will save yourself a lot of trouble.
47 #
48 # Do NOT add a slash at the end of the directory path.
49 #
50 ServerRoot "/usr/local/apache2"
51
52 #
53 # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
54 #
55 <IfModule !mpm_winnt.c>
56 <IfModule !mpm_netware.c>
57 #LockFile logs/accept.lock
58 </IfModule>
59 </IfModule>
60
61 #
62 # ScoreBoardFile: File used to store internal server process information.
63 # If unspecified (the default), the scoreboard will be stored in an
64 # anonymous shared memory segment, and will be unavailable to third-party
65 # applications.
66 # If specified, ensure that no two invocations of Apache share the same
67 # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
68 #
69 <IfModule !mpm_netware.c>
70 <IfModule !perchild.c>
71 #ScoreBoardFile logs/apache_runtime_status
72 </IfModule>
73 </IfModule>
74
75
76 #
77 # PidFile: The file in which the server should record its process
78 # identification number when it starts.
79 #
80 <IfModule !mpm_netware.c>
81 PidFile logs/httpd.pid
82 </IfModule>
83
84 #
85 # Timeout: The number of seconds before receives and sends time out.
86 #
87 Timeout 300
88
89 #
90 # KeepAlive: Whether or not to allow persistent connections (more than
91 # one request per connection). Set to "Off" to deactivate.
92 #
93 KeepAlive On
94
95 #
96 # MaxKeepAliveRequests: The maximum number of requests to allow
97 # during a persistent connection. Set to 0 to allow an unlimited amount.
98 # We recommend you leave this number high, for maximum performance.
99 #
100 MaxKeepAliveRequests 100
101
102 #
103 # KeepAliveTimeout: Number of seconds to wait for the next request from the
104 # same client on the same connection.
105 #
106 KeepAliveTimeout 15
107
108 ##
109 ## Server-Pool Size Regulation (MPM specific)
110 ##
111
112 # prefork MPM
113 # StartServers: number of server processes to start
114 # MinSpareServers: minimum number of server processes which are kept spare
115 # MaxSpareServers: maximum number of server processes which are kept spare
116 # MaxClients: maximum number of server processes allowed to start
117 # MaxRequestsPerChild: maximum number of requests a server process serves
118 <IfModule prefork.c>
119 StartServers 5
120 MinSpareServers 5
121 MaxSpareServers 10
122 MaxClients 150
123 MaxRequestsPerChild 0
124 </IfModule>
125
126 # worker MPM
127 # StartServers: initial number of server processes to start
128 # MaxClients: maximum number of simultaneous client connections
129 # MinSpareThreads: minimum number of worker threads which are kept spare
130 # MaxSpareThreads: maximum number of worker threads which are kept spare
131 # ThreadsPerChild: constant number of worker threads in each server process
132 # MaxRequestsPerChild: maximum number of requests a server process serves
133 <IfModule worker.c>
134 StartServers 2
135 MaxClients 150
136 MinSpareThreads 25
137 MaxSpareThreads 75
138 ThreadsPerChild 25
139 MaxRequestsPerChild 0
140 </IfModule>
141
142 # perchild MPM
143 # NumServers: constant number of server processes
144 # StartThreads: initial number of worker threads in each server process
145 # MinSpareThreads: minimum number of worker threads which are kept spare
146 # MaxSpareThreads: maximum number of worker threads which are kept spare
147 # MaxThreadsPerChild: maximum number of worker threads in each server process
148 # MaxRequestsPerChild: maximum number of connections per server process
149 <IfModule perchild.c>
150 NumServers 5
151 StartThreads 5
152 MinSpareThreads 5
153 MaxSpareThreads 10
154 MaxThreadsPerChild 20
155 MaxRequestsPerChild 0
156 </IfModule>
157
158 # WinNT MPM
159 # ThreadsPerChild: constant number of worker threads in the server process
160 # MaxRequestsPerChild: maximum number of requests a server process serves
161 <IfModule mpm_winnt.c>
162 ThreadsPerChild 250
163 MaxRequestsPerChild 0
164 </IfModule>
165
166 # BeOS MPM
167 # StartThreads: how many threads do we initially spawn?
168 # MaxClients: max number of threads we can have (1 thread == 1 client)
169 # MaxRequestsPerThread: maximum number of requests each thread will process
170 <IfModule beos.c>
171 StartThreads 10
172 MaxClients 50
173 MaxRequestsPerThread 10000
174 </IfModule>
175
176 # NetWare MPM
177 # ThreadStackSize: Stack size allocated for each worker thread
178 # StartThreads: Number of worker threads launched at server startup
179 # MinSpareThreads: Minimum number of idle threads, to handle request spikes
180 # MaxSpareThreads: Maximum number of idle threads
181 # MaxThreads: Maximum number of worker threads alive at the same time
182 # MaxRequestsPerChild: Maximum number of requests a thread serves. It is
183 # recommended that the default value of 0 be set for this
184 # directive on NetWare. This will allow the thread to
185 # continue to service requests indefinitely.
186 <IfModule mpm_netware.c>
187 ThreadStackSize 65536
188 StartThreads 250
189 MinSpareThreads 25
190 MaxSpareThreads 250
191 MaxThreads 1000
192 MaxRequestsPerChild 0
193 </IfModule>
194
195 # OS/2 MPM
196 # StartServers: Number of server processes to maintain
197 # MinSpareThreads: Minimum number of idle threads per process,
198 # to handle request spikes
199 # MaxSpareThreads: Maximum number of idle threads per process
200 # MaxRequestsPerChild: Maximum number of connections per server process
201 <IfModule mpmt_os2.c>
202 StartServers 2
203 MinSpareThreads 5
204 MaxSpareThreads 10
205 MaxRequestsPerChild 0
206 </IfModule>
207
208 #
209 # Listen: Allows you to bind Apache to specific IP addresses and/or
210 # ports, instead of the default. See also the <VirtualHost>
211 # directive.
212 #
213 # Change this to Listen on specific IP addresses as shown below to
214 # prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
215 #
216 #Listen 12.34.56.78:80
217
218 Listen 80
219
220 #
221 # Dynamic Shared Object (DSO) Support
222 #
223 # To be able to use the functionality of a module which was built as a DSO you
224 # have to place corresponding `LoadModule' lines at this location so the
225 # directives contained in it are actually available _before_ they are used.
226 # Statically compiled modules (those listed by `httpd -l') do not need
227 # to be loaded here.
228 #
229 # Example:
230 # LoadModule foo_module modules/mod_foo.so
231LoadModule php4_module modules/libphp4.so
232 #
233
234 #
235 # ExtendedStatus controls whether Apache will generate "full" status
236 # information (ExtendedStatus On) or just basic information (ExtendedStatus
237 # Off) when the "server-status" handler is called. The default is Off.
238 #
239 #ExtendedStatus On
240
241 ### Section 2: 'Main' server configuration
242 #
243 # The directives in this section set up the values used by the 'main'
244 # server, which responds to any requests that aren't handled by a
245 # <VirtualHost> definition. These values also provide defaults for
246 # any <VirtualHost> containers you may define later in the file.
247 #
248 # All of these directives may appear inside <VirtualHost> containers,
249 # in which case these default settings will be overridden for the
250 # virtual host being defined.
251 #
252
253 <IfModule !mpm_winnt.c>
254 <IfModule !mpm_netware.c>
255 #
256 # If you wish httpd to run as a different user or group, you must run
257 # httpd as root initially and it will switch.
258 #
259 # User/Group: The name (or #number) of the user/group to run httpd as.
260 # . On SCO (ODT 3) use "User nouser" and "Group nogroup".
261 # . On HPUX you may not be able to use shared memory as nobody, and the
262 # suggested workaround is to create a user www and use that user.
263 # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
264 # when the value of (unsigned)Group is above 60000;
265 # don't use Group #-1 on these systems!
266 #
267 User nobody
268 Group nobody
269 </IfModule>
270 </IfModule>
271
272 #
273 # ServerAdmin: Your address, where problems with the server should be
274 # e-mailed. This address appears on some server-generated pages, such
275 # as error documents. e.g. admin@your-domain.com
276 #
277 ServerAdmin yumi@yumidon.com
278
279 #
280 # ServerName gives the name and port that the server uses to identify itself.
281 # This can often be determined automatically, but we recommend you specify
282 # it explicitly to prevent problems during startup.
283 #
284 # If this is not set to valid DNS name for your host, server-generated
285 # redirections will not work. See also the UseCanonicalName directive.
286 #
287 # If your host doesn't have a registered DNS name, enter its IP address here.
288 # You will have to access it by its address anyway, and this will make
289 # redirections work in a sensible way.
290 #
291 ServerName server2.yumidon.com:80
292
293 #
294 # UseCanonicalName: Determines how Apache constructs self-referencing
295 # URLs and the SERVER_NAME and SERVER_PORT variables.
296 # When set "Off", Apache will use the Hostname and Port supplied
297 # by the client. When set "On", Apache will use the value of the
298 # ServerName directive.
299 #
300 UseCanonicalName Off
301
302 #
303 # DocumentRoot: The directory out of which you will serve your
304 # documents. By default, all requests are taken from this directory, but
305 # symbolic links and aliases may be used to point to other locations.
306 #
307 DocumentRoot "/usr/local/apache2/○○"
308
309 #
310 # Each directory to which Apache has access can be configured with respect
311 # to which services and features are allowed and/or disabled in that
312 # directory (and its subdirectories).
313 #
314 # First, we configure the "default" to be a very restrictive set of
315 # features.
316 #
317 <Directory "/usr/local/apache2/○○/△△">
318 Options FollowSymLinks
319 AllowOverride AuthConfig Limit
320 </Directory>

321
322 #
323 # Note that from this point forward you must specifically allow
324 # particular features to be enabled - so if something's not working as
325 # you might expect, make sure that you have specifically enabled it
326 # below.
327 #
328
329 #
330 # This should be changed to whatever you set DocumentRoot to.
331 #
332 <Directory "/usr/local/apache2/○○">
333
334 #
335 # Possible values for the Options directive are "None", "All",
336 # or any combination of:
337 # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
338 #
339 # Note that "MultiViews" must be named *explicitly* --- "Options All"
340 # doesn't give it to you.
341 #
342 # The Options directive is both complicated and important. Please see
343 # http://httpd.apache.org/docs-2.0/mod/core.html#options
344 # for more information.
345 #
346 Options Indexes FollowSymLinks ExecCGI
347
348 #
349 # AllowOverride controls what directives may be placed in .htaccess files.
350 # It can be "All", "None", or any combination of the keywords:
351 # Options FileInfo AuthConfig Limit
352 #
353 AllowOverride All
354
355 #
356 # Controls who can get stuff from this server.
357 #
358 Order allow,deny
359 Allow from all
360
361 </Directory>
362
363 #
364 # UserDir: The name of the directory that is appended onto a user's home
365 # directory if a ~user request is received.
366 #
367 #UserDir public_html
368
369 #
370 # Control access to UserDir directories. The following is an example
371 # for a site where these directories are restricted to read-only.
372 #
373 #<Directory /home/*/public_html>
374 # AllowOverride FileInfo AuthConfig Limit Indexes
375 # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
376 # <Limit GET POST OPTIONS PROPFIND>
377 # Order allow,deny
378 # Allow from all
379 # </Limit>
380 # <LimitExcept GET POST OPTIONS PROPFIND>
381 # Order deny,allow
382 # Deny from all
383 # </LimitExcept>
384 #</Directory>
385
386 #
387 # DirectoryIndex: sets the file that Apache will serve if a directory
388 # is requested.
389 #
390 # The index.html.var file (a type-map) is used to deliver content-
391 # negotiated documents. The MultiViews Option can be used for the
392 # same purpose, but it is much slower.
393 #
394 DirectoryIndex index.html index.php
395
396 #
397 # AccessFileName: The name of the file to look for in each directory
398 # for additional configuration directives. See also the AllowOverride
399 # directive.
400 #
401 AccessFileName .htaccess
402
403 #
404 # The following lines prevent .htaccess and .htpasswd files from being
405 # viewed by Web clients.
406 #
407 <Files ~ "^\.ht">
408 Order allow,deny
409 Deny from all
410 </Files>
411
412 #
413 # TypesConfig describes where the mime.types file (or equivalent) is
414 # to be found.
415 #
416 TypesConfig conf/mime.types
417
418 #
419 # DefaultType is the default MIME type the server will use for a document
420 # if it cannot otherwise determine one, such as from filename extensions.
421 # If your server contains mostly text or HTML documents, "text/plain" is
422 # a good value. If most of your content is binary, such as applications
423 # or images, you may want to use "application/octet-stream" instead to
424 # keep browsers from trying to display binary files as though they are
425 # text.
426 #
427 DefaultType text/plain
428
429 #
430 # The mod_mime_magic module allows the server to use various hints from the
431 # contents of the file itself to determine its type. The MIMEMagicFile
432 # directive tells the module where the hint definitions are located.
433 #
434 <IfModule mod_mime_magic.c>
435 MIMEMagicFile conf/magic
436 </IfModule>
437
438 #
439 # HostnameLookups: Log the names of clients or just their IP addresses
440 # e.g., www.apache.org (on) or 204.62.129.132 (off).
441 # The default is off because it'd be overall better for the net if people
442 # had to knowingly turn this feature on, since enabling it means that
443 # each client request will result in AT LEAST one lookup request to the
444 # nameserver.
445 #
446 HostnameLookups On
447
448 #
449 # EnableMMAP: Control whether memory-mapping is used to deliver
450 # files (assuming that the underlying OS supports it).
451 # The default is on; turn this off if you serve from NFS-mounted
452 # filesystems. On some systems, turning it off (regardless of
453 # filesystem) can improve performance; for details, please see
454 # http://httpd.apache.org/docs-2.0/mod/core.html#enablemmap
455 #
456 #EnableMMAP off
457
458 #
459 # EnableSendfile: Control whether the sendfile kernel support is
460 # used to deliver files (assuming that the OS supports it).
461 # The default is on; turn this off if you serve from NFS-mounted
462 # filesystems. Please see
463 # http://httpd.apache.org/docs-2.0/mod/core.html#enablesendfile
464 #
465 #EnableSendfile off
466
467 #
468 # ErrorLog: The location of the error log file.
469 # If you do not specify an ErrorLog directive within a <VirtualHost>
470 # container, error messages relating to that virtual host will be
471 # logged here. If you *do* define an error logfile for a <VirtualHost>
472 # container, that host's errors will be logged there and not here.
473 #
474 ErrorLog logs/error_log
475
476 #
477 # LogLevel: Control the number of messages logged to the error_log.
478 # Possible values include: debug, info, notice, warn, error, crit,
479 # alert, emerg.
480 #
481 LogLevel warn
482
483 #
484 # The following directives define some format nicknames for use with
485 # a CustomLog directive (see below).
486 #
487 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
488 LogFormat "%h %l %u %t \"%r\" %>s %b" common
489 LogFormat "%{Referer}i -> %U" referer
490 LogFormat "%{User-agent}i" agent
491
492 # You need to enable mod_logio.c to use %I and %O
493 #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
494
495 #
496 # The location and format of the access logfile (Common Logfile Format).
497 # If you do not define any access logfiles within a <VirtualHost>
498 # container, they will be logged here. Contrariwise, if you *do*
499 # define per-<VirtualHost> access logfiles, transactions will be
500 # logged therein and *not* in this file.
501 #
502 CustomLog logs/access_log combined
503
504 #
505 # If you would like to have agent and referer logfiles, uncomment the
506 # following directives.
507 #
508 #CustomLog logs/referer_log referer
509 #CustomLog logs/agent_log agent
510
511 #
512 # If you prefer a single logfile with access, agent, and referer information
513 # (Combined Logfile Format) you can use the following directive.
514 #
515 #CustomLog logs/access_log combined
516
517 #
518 # ServerTokens
519 # This directive configures what you return as the Server HTTP response
520 # Header. The default is 'Full' which sends information about the OS-Type
521 # and compiled in modules.
522 # Set to one of: Full | OS | Minor | Minimal | Major | Prod
523 # where Full conveys the most information, and Prod the least.
524 #
525 ServerTokens ProductOnly
526
527 #
528 # Optionally add a line containing the server version and virtual host
529 # name to server-generated pages (internal error documents, FTP directory
530 # listings, mod_status and mod_info output etc., but not CGI generated
531 # documents or custom error documents).
532 # Set to "EMail" to also include a mailto: link to the ServerAdmin.
533 # Set to one of: On | Off | EMail
534 #
535 ServerSignature off
536
537 #
538 # Aliases: Add here as many aliases as you need (with no limit). The format is
539 # Alias fakename realname
540 #
541 # Note that if you include a trailing / on fakename then the server will
542 # require it to be present in the URL. So "/icons" isn't aliased in this
543 # example, only "/icons/". If the fakename is slash-terminated, then the
544 # realname must also be slash terminated, and if the fakename omits the
545 # trailing slash, the realname must also omit it.
546 #
547 # We include the /icons/ alias for FancyIndexed directory listings. If you
548 # do not use FancyIndexing, you may comment this out.
549 #
550 Alias /icons/ "/usr/local/apache2/icons/"
551
552 <Directory "/usr/local/apache2/icons">
553 Options Indexes MultiViews
554 AllowOverride None
555 Order allow,deny
556 Allow from all
557 </Directory>
558
559 #
560 # This should be changed to the ServerRoot/manual/. The alias provides
561 # the manual, even if you choose to move your DocumentRoot. You may comment
562 # this out if you do not care for the documentation.
563 #
564 AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "/usr/local/apache2/manual$1"
565
566 <Directory "/usr/local/apache2/manual">
567 Options Indexes
568 AllowOverride None
569 Order allow,deny
570 Allow from all
571
572 <Files *.html>
573 SetHandler type-map
574 </Files>
575
576 SetEnvIf Request_URI ^/manual/de/ prefer-language=de
577 SetEnvIf Request_URI ^/manual/en/ prefer-language=en
578 SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
579 SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
580 SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
581 SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
582 RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
583 </Directory>
584
585 #
586 # ScriptAlias: This controls which directories contain server scripts.
587 # ScriptAliases are essentially the same as Aliases, except that
588 # documents in the realname directory are treated as applications and
589 # run by the server when requested rather than as documents sent to the client.
590 # The same rules about trailing "/" apply to ScriptAlias directives as to
591 # Alias.
592 #
593 ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/"
594
595 <IfModule mod_cgid.c>
596 #
597 # Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
598 # for setting UNIX socket for communicating with cgid.
599 #
600 #Scriptsock logs/cgisock
601 </IfModule>
602
603 #
604 # "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
605 # CGI directory exists, if you have that configured.
606 #
607 <Directory "/usr/local/apache2/cgi-bin">
608 AllowOverride None
609 Options None
610 Order allow,deny
611 Allow from all
612 </Directory>
613
614 #
615 # Redirect allows you to tell clients about documents which used to exist in
616 # your server's namespace, but do not anymore. This allows you to tell the
617 # clients where to look for the relocated document.
618 # Example:
619 # Redirect permanent /foo http://www.example.com/bar
620
621 #
622 # Directives controlling the display of server-generated directory listings.
623 #
624
625 #
626 # IndexOptions: Controls the appearance of server-generated directory
627 # listings.
628 #
629 IndexOptions FancyIndexing VersionSort
630
631 #
632 # AddIcon* directives tell the server which icon to show for different
633 # files or filename extensions. These are only displayed for
634 # FancyIndexed directories.
635 #
636 AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
637
638 AddIconByType (TXT,/icons/text.gif) text/*
639 AddIconByType (IMG,/icons/image2.gif) image/*
640 AddIconByType (SND,/icons/sound2.gif) audio/*
641 AddIconByType (VID,/icons/movie.gif) video/*
642
643 AddIcon /icons/binary.gif .bin .exe
644 AddIcon /icons/binhex.gif .hqx
645 AddIcon /icons/tar.gif .tar
646 AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
647 AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
648 AddIcon /icons/a.gif .ps .ai .eps
649 AddIcon /icons/layout.gif .html .shtml .htm .pdf
650 AddIcon /icons/text.gif .txt
651 AddIcon /icons/c.gif .c
652 AddIcon /icons/p.gif .pl .py
653 AddIcon /icons/f.gif .for
654 AddIcon /icons/dvi.gif .dvi
655 AddIcon /icons/uuencoded.gif .uu
656 AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
657 AddIcon /icons/tex.gif .tex
658 AddIcon /icons/bomb.gif core
659
660 AddIcon /icons/back.gif ..
661 AddIcon /icons/hand.right.gif README
662 AddIcon /icons/folder.gif ^^DIRECTORY^^
663 AddIcon /icons/blank.gif ^^BLANKICON^^
664
665 #
666 # DefaultIcon is which icon to show for files which do not have an icon
667 # explicitly set.
668 #
669 DefaultIcon /icons/unknown.gif
670
671 #
672 # AddDescription allows you to place a short description after a file in
673 # server-generated indexes. These are only displayed for FancyIndexed
674 # directories.
675 # Format: AddDescription "description" filename
676 #
677 #AddDescription "GZIP compressed document" .gz
678 #AddDescription "tar archive" .tar
679 #AddDescription "GZIP compressed tar archive" .tgz
680
681 #
682 # ReadmeName is the name of the README file the server will look for by
683 # default, and append to directory listings.
684 #
685 # HeaderName is the name of a file which should be prepended to
686 # directory indexes.
687 ReadmeName README.html
688 HeaderName HEADER.html
689
690 #
691 # IndexIgnore is a set of filenames which directory indexing should ignore
692 # and not include in the listing. Shell-style wildcarding is permitted.
693 #
694 IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
695
696 #
697 # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
698 # information on the fly. Note: Not all browsers support this.
699 # Despite the name similarity, the following Add* directives have nothing
700 # to do with the FancyIndexing customization directives above.
701 #
702 #AddEncoding x-compress Z
703 #AddEncoding x-gzip gz tgz
704
705 #
706 # DefaultLanguage and AddLanguage allows you to specify the language of
707 # a document. You can then use content negotiation to give a browser a
708 # file in a language the user can understand.
709 #
710 # Specify a default language. This means that all data
711 # going out without a specific language tag (see below) will
712 # be marked with this one. You probably do NOT want to set
713 # this unless you are sure it is correct for all cases.
714 #
715 # * It is generally better to not mark a page as
716 # * being a certain language than marking it with the wrong
717 # * language!
718 #
719 # DefaultLanguage nl
720 #
721 # Note 1: The suffix does not have to be the same as the language
722 # keyword --- those with documents in Polish (whose net-standard
723 # language code is pl) may wish to use "AddLanguage pl .po" to
724 # avoid the ambiguity with the common suffix for perl scripts.
725 #
726 # Note 2: The example entries below illustrate that in some cases
727 # the two character 'Language' abbreviation is not identical to
728 # the two character 'Country' code for its country,
729 # E.g. 'Danmark/dk' versus 'Danish/da'.
730 #
731 # Note 3: In the case of 'ltz' we violate the RFC by using a three char
732 # specifier. There is 'work in progress' to fix this and get
733 # the reference data for rfc1766 cleaned up.
734 #
735 # Danish (da) - Dutch (nl) - English (en) - Estonian (et)
736 # French (fr) - German (de) - Greek-Modern (el)
737 # Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko)
738 # Portugese (pt) - Luxembourgeois* (ltz)
739 # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cs)
740 # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
741 # Russian (ru) - Croatian (hr)
742 #
743 AddLanguage da .dk
744 AddLanguage nl .nl
745 AddLanguage en .en
746 AddLanguage et .et
747 AddLanguage fr .fr
748 AddLanguage de .de
749 AddLanguage he .he
750 AddLanguage el .el
751 AddLanguage it .it
752 AddLanguage ja .ja
753 AddLanguage pl .po
754 AddLanguage ko .ko
755 AddLanguage pt .pt
756 AddLanguage nn .nn
757 AddLanguage no .no
758 AddLanguage pt-br .pt-br
759 AddLanguage ltz .ltz
760 AddLanguage ca .ca
761 AddLanguage es .es
762 AddLanguage sv .sv
763 AddLanguage cs .cz .cs
764 AddLanguage ru .ru
765 AddLanguage zh-CN .zh-cn
766 AddLanguage zh-TW .zh-tw
767 AddLanguage hr .hr
768
769 #
770 # LanguagePriority allows you to give precedence to some languages
771 # in case of a tie during content negotiation.
772 #
773 # Just list the languages in decreasing order of preference. We have
774 # more or less alphabetized them here. You probably want to change this.
775 #
776 LanguagePriority ja en da nl et fr de el it ko no pl pt pt-br ltz ca es sv tw
777
778 #
779 # ForceLanguagePriority allows you to serve a result page rather than
780 # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
781 # [in case no accepted languages matched the available variants]
782 #
783 ForceLanguagePriority Prefer Fallback
784
785 #
786 # Specify a default charset for all pages sent out. This is
787 # always a good idea and opens the door for future internationalisation
788 # of your web site, should you ever want it. Specifying it as
789 # a default does little harm; as the standard dictates that a page
790 # is in iso-8859-1 (latin1) unless specified otherwise i.e. you
791 # are merely stating the obvious. There are also some security
792 # reasons in browsers, related to javascript and URL parsing
793 # which encourage you to always set a default char set.
794 #
795 AddDefaultCharset Off
796
797 #
798 # Commonly used filename extensions to character sets. You probably
799 # want to avoid clashes with the language extensions, unless you
800 # are good at carefully testing your setup after each change.
801 # See http://www.iana.org/assignments/character-sets for the
802 # official list of charset names and their respective RFCs.
803 #
804 AddCharset ISO-8859-1 .iso8859-1 .latin1
805 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
806 AddCharset ISO-8859-3 .iso8859-3 .latin3
807 AddCharset ISO-8859-4 .iso8859-4 .latin4
808 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
809 AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
810 AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
811 AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
812 AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
813 AddCharset ISO-2022-JP .iso2022-jp .jis
814 AddCharset ISO-2022-KR .iso2022-kr .kis
815 AddCharset ISO-2022-CN .iso2022-cn .cis
816 AddCharset Big5 .Big5 .big5
817 # For russian, more than one charset is used (depends on client, mostly):
818 AddCharset WINDOWS-1251 .cp-1251 .win-1251
819 AddCharset CP866 .cp866
820 AddCharset KOI8-r .koi8-r .koi8-ru
821 AddCharset KOI8-ru .koi8-uk .ua
822 AddCharset ISO-10646-UCS-2 .ucs2
823 AddCharset ISO-10646-UCS-4 .ucs4
824 AddCharset UTF-8 .utf8
825
826 # The set below does not map to a specific (iso) standard
827 # but works on a fairly wide range of browsers. Note that
828 # capitalization actually matters (it should not, but it
829 # does for some browsers).
830 #
831 # See http://www.iana.org/assignments/character-sets
832 # for a list of sorts. But browsers support few.
833 #
834 AddCharset GB2312 .gb2312 .gb
835 AddCharset utf-7 .utf7
836 AddCharset utf-8 .utf8
837 AddCharset big5 .big5 .b5
838 AddCharset EUC-TW .euc-tw
839 AddCharset EUC-JP .euc-jp
840 AddCharset EUC-KR .euc-kr
841 AddCharset shift_jis .sjis
842
843 #
844 # AddType allows you to add to or override the MIME configuration
845 # file mime.types for specific file types.
846 #
847 AddType application/x-tar .tgz
848 AddType image/x-icon .ico
849 AddType application/x-httpd-php .php
850 #
851 # AddHandler allows you to map certain file extensions to "handlers":
852 # actions unrelated to filetype. These can be either built into the server
853 # or added with the Action directive (see below)
854 #
855 # To use CGI scripts outside of ScriptAliased directories:
856 # (You will also need to add "ExecCGI" to the "Options" directive.)
857 #
858 AddHandler cgi-script .cgi
859 AddHandler cgi-script .pl

860 #
861 # For files that include their own HTTP headers:
862 #
863 AddHandler send-as-is asis
864
865 #
866 # For server-parsed imagemap files:
867 #
868 #AddHandler imap-file map
869
870 #
871 # For type maps (negotiated resources):
872 # (This is enabled by default to allow the Apache "It Worked" page
873 # to be distributed in multiple languages.)
874 #
875 AddHandler type-map var
876
877 #
878 # Filters allow you to process content before it is sent to the client.
879 #
880 # To parse .shtml files for server-side includes (SSI):
881 # (You will also need to add "Includes" to the "Options" directive.)
882 #
883 AddType text/html .shtml
884 AddOutputFilter INCLUDES .shtml
885
886 #
887 # Action lets you define media types that will execute a script whenever
888 # a matching file is called. This eliminates the need for repeated URL
889 # pathnames for oft-used CGI file processors.
890 # Format: Action media/type /cgi-script/location
891 # Format: Action handler-name /cgi-script/location
892 #
893
894 #
895 # Customizable error responses come in three flavors:
896 # 1) plain text 2) local redirects 3) external redirects
897 #
898 # Some examples:
899 #ErrorDocument 500 "The server made a boo boo."
900 #ErrorDocument 404 /missing.html
901 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
902 #ErrorDocument 402 http://www.example.com/subscription_info.html
903 #
904
905 #
906 # Putting this all together, we can internationalize error responses.
907 #
908 # We use Alias to redirect any /error/HTTP_<error>.html.var response to
909 # our collection of by-error message multi-language collections. We use
910 # includes to substitute the appropriate text.
911 #
912 # You can modify the messages' appearance without changing any of the
913 # default HTTP_<error>.html.var files by adding the line:
914 #
915 # Alias /error/include/ "/your/include/path/"
916 #
917 # which allows you to create your own set of files by starting with the
918 # /usr/local/apache2/error/include/ files and copying them to /your/include/path/,
919 # even on a per-VirtualHost basis. The default include files will display
920 # your Apache version number and your ServerAdmin email address regardless
921 # of the setting of ServerSignature.
922 #
923 # The internationalized error documents require mod_alias, mod_include
924 # and mod_negotiation. To activate them, uncomment the following 30 lines.
925
926 # Alias /error/ "/usr/local/apache2/error/"
927 #
928 # <Directory "/usr/local/apache2/error">
929 # AllowOverride None
930 # Options IncludesNoExec
931 # AddOutputFilter Includes html
932 # AddHandler type-map var
933 # Order allow,deny
934 # Allow from all
935 # LanguagePriority en cs de es fr it nl sv pt-br ro
936 # ForceLanguagePriority Prefer Fallback
937 # </Directory>
938 #
939 # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
940 # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
941 # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
942 # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
943 # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
944 # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
945 # ErrorDocument 410 /error/HTTP_GONE.html.var
946 # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
947 # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
948 # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
949 # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
950 # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
951 # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
952 # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
953 # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
954 # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
955 # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
956
957
958 #
959 # The following directives modify normal HTTP response behavior to
960 # handle known problems with browser implementations.
961 #
962 BrowserMatch "Mozilla/2" nokeepalive
963 BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
964 BrowserMatch "RealPlayer 4\.0" force-response-1.0
965 BrowserMatch "Java/1\.0" force-response-1.0
966 BrowserMatch "JDK/1\.0" force-response-1.0
967
968 #
969 # The following directive disables redirects on non-GET requests for
970 # a directory that does not include the trailing slash. This fixes a
971 # problem with Microsoft WebFolders which does not appropriately handle
972 # redirects for folders with DAV methods.
973 # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
974 #
975 BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
976 BrowserMatch "^WebDrive" redirect-carefully
977 BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
978 BrowserMatch "^gnome-vfs" redirect-carefully
979
980 #
981 # Allow server status reports generated by mod_status,
982 # with the URL of http://servername/server-status
983 # Change the ".example.com" to match your domain to enable.
984 #
985 #<Location /server-status>
986 # SetHandler server-status
987 # Order deny,allow
988 # Deny from all
989 # Allow from .example.com
990 #</Location>
991
992 #
993 # Allow remote server configuration reports, with the URL of
994 # http://servername/server-info (requires that mod_info.c be loaded).
995 # Change the ".example.com" to match your domain to enable.
996 #
997 #<Location /server-info>
998 # SetHandler server-info
999 # Order deny,allow
1000 # Deny from all
1001 # Allow from .example.com
1002 #</Location>
1003
1004
1005 #
1006 # Bring in additional module-specific configurations
1007 #
1008 <IfModule mod_ssl.c>
1009 Include conf/ssl.conf
1010 </IfModule>
1011
1012
1013 ### Section 3: Virtual Hosts
1014 #
1015 # VirtualHost: If you want to maintain multiple domains/hostnames on your
1016 # machine you can setup VirtualHost containers for them. Most configurations
1017 # use only name-based virtual hosts so the server doesn't need to worry about
1018 # IP addresses. This is indicated by the asterisks in the directives below.
1019 #
1020 # Please see the documentation at
1021 # <URL:http://httpd.apache.org/docs-2.0/vhosts/>
1022 # for further details before you try to setup virtual hosts.
1023 #
1024 # You may use the command line option '-S' to verify your virtual host
1025 # configuration.
1026
1027 #
1028 # Use name-based virtual hosting.
1029 #
1030 #NameVirtualHost *
1031
1032 #
1033 # VirtualHost example:
1034 # Almost any Apache directive may go into a VirtualHost container.
1035 # The first VirtualHost section is used for requests without a known
1036 # server name.
1037 #
1038 #<VirtualHost *>
1039 # ServerAdmin webmaster@dummy-host.example.com
1040 # DocumentRoot /www/docs/dummy-host.example.com
1041 # ServerName dummy-host.example.com
1042 # ErrorLog logs/dummy-host.example.com-error_log
1043 # CustomLog logs/dummy-host.example.com-access_log common
1044 #</VirtualHost>