Apache2 httpd.conf Chinese version _php skills
Last Update:2017-01-18
Source: Internet
Author: User
For the novice and me to see.
#
# A configuration file based on the NCSA service.
#
#这是Apache服务器主要配置文件.
#它包含服务器的影响服务器运行的配置指令.
#参见 <URL:http://httpd.ache.org/doc-2.0/> to get more information about these instructions
#
#不要只是简单的阅读这些指令信息而不去理解它.
#这里只是做了简单的说明, if you don't have a reference online file, you'll be warned.
#
#这些配置指令被分为下面三个部分:
#1. Part of controlling the entire Apache server behavior (that is, Global environment variables)
#2. A directive that defines primary or default service parameters, and also provides default setting parameters for all virtual hosts
#3. Setup parameters for the virtual host
#
#配置和日志文件名: If you specify a filename to start with "/" (Win32 "dirver:/"),
#服务器将使用绝对路径, if the filename does not start with "/", then it will put the ServerRoot
#的值附加在文件名的前面, for example, for "Logs/foo.log", if the value of ServerRoot
#为 "/usr/local/apache2", the file should be "/usr/local/apache2/logs/foo.log"
#
# #第一区: Global Environment parameters
#
#这里设置的参数将影响整个Apache服务器的行为;
#例如Apache能够处理的并发请求的数量等.
#
#ServerRoot: Indicates the root directory where the server saves its configuration, errors, log files, and so on.
#
#注意! If you want to designate it as an NFS or a location on another network,
#请一定要去阅读与LockFile有关的文档 (possibly in
#<url:http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>).
#这将会使你自己也能解决很多问题.
#
#路径的结尾不要添加斜线.
#
ServerRoot "/usr/loacl/apache2"
#
#串行访问的锁文件必须保存在本地磁盘上
#
<ifmodule!mpm_winnt.c>
<ifmodule!mpm_neware.c>
#LockFile Logs/accept.lock
</IfModule>
</IfModule>
#ScoreBoardFile: A file that is used to hold information about internal service processes.
#如果未指明 (default), the scoreboard (scoreboard) is saved in an anonymous shared memory segment.
#并且它不能被第三方软件所使用.
#如果指定了, make sure you can't use the same scoreboard file with two Apache.
#这个记分板文件必须保存在本地磁盘上.
#
<ifmodule!mpm_netware.c>
<ifmodule!perchild.c>
#ScoreBoardFile Logs/apache_runtime_status
<IfModule>
<IfModule>
#
#PidFile: The file that records the server startup process number.
#
<ifmodule!mpm_neware.c>
Pidfile Logs/httpd.pid
</IfModule>
#
#Timeout: Timeout seconds before receiving and sending
#
Timeout 300
#
#KeepAlive: Whether a solid connection is allowed (multiple requests per connection),
#设为 "Off" is deactivated.
#
KeepAlive on
#
#MaxKeepAliveRequests: The maximum number of requests allowed during a solid connection,
#设为0表示无限制接入.
#我们推荐你将其设为一个较大的值 in order to improve performance
Maxkeepaliverequests 100
#
#KeepAliveTimeout: The number of seconds to receive requests from the same client on the same connection
#
KeepAliveTimeout 15
##
# #Server-pool Size setting (for MPM)
##
# prefork MPM
# startservers: Number of processes started by the server at startup
# minspareservers: The minimum number of standby processes maintained
# Maxspareservers: The maximum number of standby processes maintained
# MaxClients: Maximum number of processes that the server allows to start
# Maxrequestsperchild: Maximum number of requests allowed by a service process
<ifmodule prefork.c>
Startservers 5
Minspareservers 5
Maxspareservers 10
MaxClients 150
Maxrequestperchild 0
</IfModule>
# worker MPM
# startservers: Number of service processes at server startup
# MaxClients: Maximum number of users allowed to connect simultaneously
# Minsparethreads: Minimum number of worker threads guaranteed
# Maxsparethreads: Maximum number of worker threads allowed
# Threadsperchild: Worker thread constants in each service process
# Maxrequestsperchild: Maximum number of requests allowed in the service process
<ifmodule worker.c>
Startservers 2
MaxClients 150
Minsparethreads 25
Maxsparethreads 75
Threadsperchild 25
Maxrequestsperchild 0
</IfModule>
# Perchild MPM
# numservers: Number of service processes
# startthreads: Number of start threads in each service process
# Minsparethreads: Minimum number of threads guaranteed
# Maxsparethreads: Maximum number of threads maintained
# Maxthreadsperchild: Maximum number of threads allowed per service process
# Maxrequestsperchild: Maximum number of connections allowed per service process
<ifmodule perchild.c>
Numservers 5
Startthreads 5
Minsparethreads 5
Maxsparethreads 10
Maxthreadsperchild 20
Maxrequestsperchild 0
</IfModule>
# WinNT MPM
# Threadsperchild: Worker thread constants in service process
# Maxrequestsperchild: Maximum number of requests allowed by the service process
<ifmodule mpm_winnt.c>
Threadsperchild 250
Maxrequestsperchild 0
</IfModule>
# BeOS MPM
# startthreads: Number of threads started at server startup
# maxclients: The maximum number of threads that can be started (one thread equals one user)
# Maxrequestsperthread: Maximum number of requests per thread allowed
<ifmodule beos.c>
Startthreads 10
MaxClients 50
Maxrequestsperthread 10000
</IfModule>
# NetWare MPM
# threadstachsize: Stack size allocated for each worker thread
# startthreads: Number of threads started at server startup
# minsparethreads: Number of idle threads used to process an actual send request
# Maxsparethreads: Maximum number of idle threads
# MaxThreads: Maximum number of threads active at the same time
# Maxrequestperchild: The maximum number of requests for a thread service,
# It is recommended to set it to 0 to achieve unrestricted access
<ifmodule mpm_netware.c>
Threadstacksize 65536
Startthreads 250
Minsparethreads 25
Maxsparethreads 250
MaxThreads 1000
Maxrequestperchild 0
</IfModule>
# OS/2 MPM
# startservers: Number of service processes started
# minsparethreads: Minimum idle thread allowed per process
# Maxsparethreads: Maximum idle threads allowed per process
# Maxrequestsperchild: Maximum number of connections allowed per service process
<ifmodule mpmt_os2.c>
Startservers 2
Minsparethreads 5
Maxsparethreads 10
Maxrequestsperchild 0
</IfModule>
#
# Listen: Allows you to bind the Apache service to the specified IP address and port to replace the default value
# See <VirtualHost> instructions
# Use the following command to enable Apache to only listen on the specified IP address.
# to prevent it from listening on the IP address 0.0.0.0
#
# Listen 12.34.56.78:80
Listen 80
#
# Dynamic sharing Support (DSO)
#
# to be able to use the functions in the modules compiled in DSO mode, you must have the corresponding "LoadModule" line,
# Therefore, the instructions are included here so that they can be activated before using it.
# Those statically compiled modules do not need to be listed here (that is, the modules listed in "Httpd-l")
#
Example
# LoadModule Foo_module modules/mod_foo.so
#
#
# Extendedstatus: When calling "Server-status", controlling Apache is generating a "full" state
# information (extendedstatus on) or generate basic information (extendedstatus off).
# Default to Off
#
# Extendedstatus on
### Zone II: "Main" service configuration
#
# This area establishes the command value that is used by the "master" server to respond to those that are not <VirtualHost>
# defines any requests that are processed.
# These values also provide a default value to the <VirtualHost> container that is defined later.
# If there is a definition in <VirtualHost>, the instruction value defined here will be
# <VirtualHost> in the definition covered.
#
<ifmodule!mpm_winnt.c>
<ifmodule!mpm_neware.c>
#
# If you want to make httpd run with another user or group, you must start with root
# then switch it to the user or group you want to use.
#
# User/group: Users and Groups running HTTPD
# use "User Nouser" and "Group Nogroup" on SCO (ODT3)
# on HPUX, you may not be able to use shared memory as nobody, and it is recommended that you create a WWW user.
# Note some cores (kernel) reject Setgid (group) or Semctl (Ipc_set) when the group ID is greater than 60000.
#节在这些系统上不要使用 "Group #-1".
#
User Nobody
Group #-1
</IfModule>
</IfModule>
#
# ServerAdmin: Your email address, and Apache will send you an email when a problem occurs.
# as an error document, this address is displayed on the server-generated page,
# For example: admin@your-domain.com
#
ServerAdmin kreny@sina.com
#
# SERVERNAME Specifies the name and port number that Apache uses to identify itself.
# Usually this value is automatically specified, but we recommend that you explicitly specify it to prevent errors at startup
#
# If you specify an invalid DNS name for your host, server-generated redirection will not work.
# See Usecanonicalname directives
#
# If your host does not have a DNS name registered, type its IP address here
# In any case, you have to use its IP address to provide services,
# here is a way to redirect services in an easy to understand manner
ServerName www.dalouis.com:80
#
# Usecanonicalname: Decide how Apache constructs URLs and server_name and server_port instructions.
# When set to OFF, Apache uses the host name and port number provided by the client.
# When set to ' on ', Apache uses the value of the servername directive.
#
Usecanonicalname off
#
# DocumentRoot: The root directory of your document. By default, all requests are answered from this directory.
# but you can use symbolic links and aliases to point to other locations.
#
DocumentRoot "/home/redhat/public_html"
#
# each directory that Apache can access can be configured with access rights (including its subdirectories).
#
# First, we configure a highly restrictive feature.
# This will prevent access to the directory where the file system resides and add the directory blocks that you want to allow access to.
# as shown below
<directory/>
Order Deny,allow
Deny from all
</Directory>
#
# Note that from here you must explicitly allow specific features to be used.
#-So, if Apache doesn't work as you expect,
# Please check if you explicitly specify that it is available below.
#
#
# This will change to the documentroot you set
#
<directory "/home/redhat/public_html" >
#
# options: The value of this directive can be ' None ', ' all ', or any combination of the following options:
# Indexes Includes followsymlinks symlinksifownermatch execcgi multiviews
#
Note that "MultiViews" must be explicitly specified, and "options all" does not provide you with this feature.
#
# This instruction is both complex and important, please see
# "Http://httpd.apache.org/docs-2.0/mod ...?" of information.
#
Options FollowSymLinks
#
# AllowOverride Controls the instructions that are placed in the. htaccess file.
# It can be ' all ', ' None ', or a combination of the following directives:
# Options FileInfo authconfig Limit
#
AllowOverride None
#
# Control who can get the service.
#
Order Allow,deny
Allow from all
</Directory>
#
# Userdir: Specifies the directory name that will be added to the user's home directory when a ~user request is received.
#
Userdir public_html
# to prevent a vulnerability on the USERDIR directive, set the root user
# like "./" Such a userdir is very useful.
# If you use Apache version 1.3 or above, we strongly recommend that you
# include the following line in your server configuration file
Userdir Disabled Root
#
# Below is an example of using the USERDIR directive to make a directory of a site have read-only properties:
#
# <Directory/home/*/public_html>
# allowoverride FileInfo authconfig Limit Indexes
# Options MultiViews Indexes symlinksifownermatch includenoexec
# <limit Get POST OPTIONS propfind>
# Order Allow,deny
# Allow from all
# </Limit>
# <limitexcept Get POST OPTIONS propfind>
# Order Deny,allow
# Deny from all
# </LimitExcept>
# </Directory>
#
# DirectoryIndex: When you define a directory for a request, Apache provides the user with the name of the service
#
# Index.html.var file (a type image file) is used to provide a document processing list,
# The MultiViews option is also available for the same purpose, but it can be very slow.
#
DirectoryIndex index.php index.html Index.html.var
#
# Accessfilename: In each directory, query the file name of the file that provides additional configuration directives for the directory.
# See allowoverride directives.
#
Accessfilename. htaccess
#
# The following line prevents the. htaccess and. htpasswd files from being viewed by Web clients.
#
<files ~ "^\.ht" >
Order Allow,deny
Deny from all
</Files>
#
# Typeconfig: Defines where to query mime.types files.
#
Typeconfig Conf/mime.types
#
# DefaultType: Defines the default MIME type provided by the server when a MIME type cannot be determined.
# If your service mainly contains text or HTML documents, ' Text/plain ' is a good choice;
# If most of them are binary documents, such as software or images, you should use
# "Application/octer-stream" to prevent browsers from displaying binaries as shown in text.
#
DefaultType Text/plain
#
# Mod_mime_magic allows the server to use a different thread (hints) from its own type of file definition.
# This mimemagicfile instruction defines the file where the hints definition resides.
#
<ifmodule mod_mime_magic.c>
Mimemagicfile Conf/magic
</IfModule>
#
# hostnamelookups: Specifies the name or IP address of the record client, for example, when this directive is on
# Record the host name, such as www.apache.org, the IP address when off, 204.62.129.132.
# The default value is off, which is much better than set to ON, because if set to on, each client request will
# cause at least one query to nameserver.
#
Hostnamelookups off
#
# Enablemmap: Controls whether memory dumps (if supported by the operating system).
# Default to ON, if your server is installed on the network File System (NFS), please close it.
# on some systems, shutting it up improves system performance (regardless of file system type);
# See Http://httpd.apache.org/docs-2.0/mod...tml#enablemmap for details
#
# Enablemmap off
#
# Enablesendfile: Controls whether to send files using Sendfile kernel support
# (if supported by the operating system). Default to ON, if your server is installed on the network file system
# (NFS), please close it.
# See Http://httpd.apache.org/docs-2.0/mod...enablesendfile
#
# Enablesendfile off
#
# ErrorLog: Error log file positioning.
# If you do not define the errorlog directive in <VirtualHost>, the error message for this virtual host
# will be recorded here. If you define errorlog there, these error messages will be recorded in your
# in the file defined, not the file defined here.
#
ErrorLog Logs/error_log
#
# LogLevel: Controls the number of log messages recorded in the error log file.
# Possible values include: Debug,info,notice,warn,error,crit,alert,emerg.
#
LogLevel warn
#
# The following instruction defines a format alias for the customlog instruction.
#
Logformat "%h%l%u%t \%r\"%>s%b \ "%{referer}i\" \ "%{user-agent}i\" "combined
Logformat "%h%l%u%t \"%r\ "%>s%b" common
Logformat "%{referer}i->%u" Referer
Logformat "%{user-agent}i" Agent
# You need to install the MOD_LOGIO.C module to use%i and%o.
# Logformat "%h%l%u%t \%r\"%>s%b \ "%{referer}i\" \ "%{user-agent}i\"%I%o "Combinedio
#
# Specifies the location and format of the Access log file (general log format).
# If you don't define this instruction in <VirtualHost>, the transmission information will be recorded here,
# If you define this command, then record it in the location you specify, not the location defined here.
#
Customlog Logs/access_log Common
#
# If you want to record agent and referer information, you can use the following instructions
#
# Customlog Logs/referer_log Referer
# Customlog Logs/agent_log Agent
#
# If you want to use a file to record access,agent and referer information,
# You can define this directive as follows:
#
# Customlog Logs/access_log Combined
#
# Servertokens
# This instruction defines the type of information contained in the HTTP response header. The default is full,
# This means the operating system type and compilation information in the module will be included in the response header.
# can be set to one of the values in the column:
# Full | OS | Minor | Minimal | Major | Prod
# Full conveys the most information, and prod the least.
#
Servertokens full
#
# Add the server version and the virtual host name one line of information to the server-generated output page at random
# (Internal error document, FTP directory list, mod_status and mod_info output, etc. except CGI errors
# or outside of a custom error document.
# set to ' EMail ' will contain a mailto that points to serveradmin: connection.
# can be the following values: On | Off | EMail
#
Serversignature on
#
# aliases: Add the alias you need at this point, the format is as follows:
# alias alias real name
#
Note that if you include "/" at the end of the alias, you also need to include "/" in the URL.
# Therefore, '/icons ' is not an alias in this example.
# If the alias ends with '/', then the real name must also end with "/",
# If the ending '/' is omitted from the alias, the real name must also be omitted.
#
# We use the alias '/icons/' to represent the list of fancyindexed directories, if you don't use,
# fancyindexing, you can comment it out.
#
# alias/icons/"/usr/local/apache2/icons/"
# <directory "/usr/local/apache2/icons" >
# Options Indexes MultiViews
# allowoverride None
# Order Allow,deny
# # Allow from all
# </Directory>
#
# This will change serverroot/manual. This alias provides the location of the man page,
# Even if you change your documentroot. If you don't care if there's no manual page,
# You can comment it out.
#
Alias/manual "/usr/loacl/apache2/manual"
<directory "/usr/local/apache2/manual" >
Options Indexes followsymlinks multiviews includesnoexec
Addoutputfilter Includes HTML
Order Allow,deny
Allow from all
</Directory>
#
# Scriptalias: Specifies the directory that contains the service script.
# scriptaliases is essentially the same as aliases, except that the document here is processed as a procedure when requested.
# the tail '/' rule is the same as the alias
#
scriptalias/cgi-bin/"/usr/loacl/apache2/cgi-bin/"
# Here are instructions to add PHP 4 support
AddType application/x-httpd-php. php
LoadModule Php4_module modules/libphp4.so
<ifmodule mod_cgid.c>
#
# Add MOD_CGID.C settings, Mod_cgid provide UNIX sockets that use Cgid for communication.
# Script interface path.
#
# Scriptsock Logs/cgisock
</IfModule>
#
# change "/usr/local/apache2/cgi-bin" to your scriptaliased-specified CGI directory,
# If you have a configuration.
#
<directory "/usr/local/apache2/cgi-bin" >
AllowOverride None
Options None
Order Allow,deny
Allow from all
</Directory>
#
# REDIRECT allows you to tell clients to use documents that exist in the server namespace.
# Instead of now, this helps customers locate documents that have changed locations.
e.g.
# Redirect Permanent/foo Http://www.example.com/bar
#
# Control the server-generated directory list display instructions
#
#
# indexoptions: Controls server-generated directory list display features.
#
Indexoptions fancyindexing Versionsort
#
# addicon* instructions tell the server how to display the image files with different extensions,
# applies only to fancyindexed directives
#
Addiconbyencoding (cmp,/icons/compressed.gif) x-compress X-gzip
Addiconbytype (txt,/icons/text.gif) text/*
Addiconbytype (img,/icons/image2.gif) image/*
Addiconbytype (snd,/icons/sound2.gif) audio/*
Addiconbytype (vid,/icons/movie.gif) video/*
Addicon/icons/binary.gif. bin. exe
Addicon/icons/binhex.gif. hqx
Addicon/icons/tar.gif. Tar
Addicon/icons/world2.gif. wrl. wrl.gz. vrml. Vrm. IV
Addicon/icons/compressed.gif. Z. tgz. gz. zip
Addicon/icons/a.gif. ps. ai. eps
Addicon/icons/layout.gif. html. shtml. htm. pdf
Addicon/icons/text.gif. txt
Addicon/icons/c.gif. C
addicon/icons/p.gif. pl. py
Addicon/icons/f.gif. For
Addicon/icons/dvi.gif. DVI
Addicon/icons/uuencoded.gif. UU
Addicon/icons/script.gif. Sh. Shar. csh. Ksh. tcl
Addicon/icons/tex.gif. Tex
Addicon/icons/bomb.gif Core
Addicon/icons/back.gif..
Addicon/icons/hand.right.gif README
Addicon/icons/folder.gif ^^ directory^^
Addicon/icons/blank.gif ^^ blankicon^^
#
# DEFAULTICON provides processing for files that do not have an explicit definition icon
#
Defaulticon/icons/unknown.gif
#
# adddescription allows you to place a short description after the server-generated index.
# is valid only for fancyindexed directives.
# Format: adddescription ' description ' filename
#
# adddescription "GZIP compressed document". GZ
# adddescription "Tar archive". Tar
# adddescription "GZIP Compressed Tar archive". tgz
#
# READMENAME Specifies the name of the Readme file that the server finds by default and adds it to the directory list
#
# HEADERNAME Specifies the filename of the directory list prefix file
Readmename readme.html
Headername header.html
#
# INDEXIGNORE Specifies a collection of file names that the directory index ignores and is not included in the list.
# supports Shell-type wildcard characters.
#
Indexignore.?? * *~ *# header* readme* RCS CVS *,v *,t
#
# addencoding allows you to use (mosaic/x 2.1+) to decompress information in a message transfer,
# Note: Not all browsers support this option.
# Although the names are similar, the following instructions are different from the fancyindexing custom instructions above.
#
AddEncoding x-compress Z
AddEncoding X-gzip GZ tgz
#
# DefaultLanguage and AddLanguage allow you to specify the language of the document.
# This allows you to allow users to navigate the document in a language that is easy to understand.
#
# Specifies the default language, which means that all packages that do not have the specified language will use that language.
# In most cases, you may not want to set it, unless you're sure it's the right thing to do.
# Usually, it's better not to use a certain language than to use the wrong language.
#
# DefaultLanguage NL
#
# note 1: The affix as a language keyword is undoubtedly not the same--using the Polish
# Document (Network standard language Code is PL) will want to use "addlanguage pl. po"
# to avoid two semantics with the generic affixes of Perl scripts.
#
# NOTE 2: The following example illustrates the two-character abbreviation of a language in some examples with its country
# The two character abbreviations are not the same, such as "DANMARK/DK" and "Danmark/da" comparisons.
#
# Note 3: In the case of "ltz" we use a three-character affix that violates the requirements of the RFC,
# The operation will fix it and use the RFC1766 standard to obtain reference data.
#
# Danish (DA)-Dutch (NL)-中文版 (en)-Estonian (ET)
# French (FR)-German (DE)-Greek-modern (EL)
# Italian (IT)-Norwegian (NO)-Norwegian Nynorsk (NN)-Korean (KO)
# Portugese (PT)-luxembourgeois* (LTZ)
# Spanish (es)-Swedish (SV)-Catalan (CA)-Czech (CZ)
# Polish (PL)-Brazilian Portuguese (PT-BR)-Japanese (JA)
# Russian (RU)-Croatian (HR)
#
AddLanguage da. DK
AddLanguage NL. nl
AddLanguage en. en
AddLanguage et et.
AddLanguage Fr. fr
AddLanguage de. de
AddLanguage He.
AddLanguage el. El
AddLanguage it. it
AddLanguage ja. Ja
AddLanguage Pl. po
AddLanguage Ko Ko
AddLanguage Pt. PT
AddLanguage nn. nn
AddLanguage No. No
AddLanguage pt-br. pt-br
AddLanguage Ltz. Ltz
AddLanguage ca. ca
AddLanguage es. es
AddLanguage sv. sv
AddLanguage CZ. CZ
AddLanguage ru. ru
AddLanguage tw. tw
AddLanguage ZH-TW. TW
AddLanguage hr. HR
# languagepriority allows you to use a number of languages as a priority during the session.
#
# list them in descending order of precedence. We're more or less using alphabetical order.
# arrange them. Maybe you want to change that order.
Languagepriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv TW
#
# forcelanguagepriority allows you to multiple choices (prefer) [in the case of communications]
# or not acceptable (fallback) [No acceptable language match] provides a result page.
#
Forcelanguagepriority prefer fallback
#
# It's always a good idea to specify the default character set for all the pages that are sent, and for your
# The internationalization of Web sites opens the door, isn't that what you wanted? In the same way, specify
# The default character set has some minor damage, such as a use of iso-8859-1 (latin1) standard command
# page, unless you specify it in a different way, for example, you simply declare it in an explicit way.
# There are some related to the javascropt and URL syntax that always encourages you to use the default character set
# 's browser security reasons.
#
#AddDefaultCharset iso-8859-1
Adddefaultcharse GB2312
#
# typically use character sets in the form of file extensions. Maybe you want to avoid with language extensions happening
# collisions, unless you do a good test after each change.
# See Http://www.iana.org/assignments/character-sets to get character sets
# List of names and their respective RFCs.
#
Addcharset iso-8859-1. Iso8859-1 latin1
Addcharset iso-8859-2. iso8859-2 latin2. Cen
Addcharset iso-8859-3. iso8859-3 latin3
Addcharset iso-8859-4. Iso8859-4 latin4
Addcharset iso-8859-5. iso8859-5 latin5 Cyr. Iso-ru
Addcharset iso-8859-6. iso8859-6 latin6. Arb
Addcharset iso-8859-7. iso8859-7 latin7. Grk
Addcharset iso-8859-8. iso8859-8 latin8. Heb
Addcharset iso-8859-9. iso8859-9 latin9. trk
Addcharset iso-2022-jp. Iso2022-jp. JIS
Addcharset iso-2022-kr. Iso2022-kr Kis
Addcharset ISO-2022-CN. Iso2022-cn. CIS
Addcharset Big5. Big5. Big5
# for Russian, multiple character sets are used (how to use the main client):
Addcharset WINDOWS-1251. cp-1251 win-1251
Addcharset CP866. cp866
Addcharset koi8-r. Koi8-r Koi8-ru
Addcharset Koi8-ru. Koi8-uk. UA
Addcharset iso-10646-ucs-2. ucs2
Addcharset iso-10646-ucs-4. Ucs4
Addcharset UTF-8. UTF8
# The following character sets are not mapped to a specific standard (ISO), but they are in the browser
# has been widely supported. Note those capitals.
# (it shouldn't be, but it's for compatibility with some browsers)
#
# See Http://www.iana.org/assianments/character-sets to get
# their list. But browsers support less.
#
Addcharset GB2312. gb2312. GB
Addcharset utf-7. Utf7
Addcharset utf-8. UTF8
Addcharset Big5. Big5 b5
Addcharset EUC-TW. euc-tw
Addcharset EUC-JP. euc-jp
Addcharset Euc-kr. Euc-kr
Addcharset Shift_JIS. Sjis
#
# AddType allows you to add or overwrite the MIME that is configured in the Mime.types file for the specified file type
#
AddType Application/x-tar. tgz
AddType Image/x-icon. ico
#
# addhandler allows you to map the defined file extension to "handlers":
# behavior that is independent of the file type. This can be either compiled to the server or added to the action command
# in (see below).
# to use CGI scripts other than those specified by the scriptaliased directive:
# (To make it available, you'll also need to add "execcgi" to the options.)
#
# AddHandler Cgi-script. CGI
#
# for files that contain their own HTTP headers
#
# AddHandler Send-as-is ASIS
#
# for server-parsed imagemap files:
#
# AddHandler Imap-file Map
#
# Agemap File:
#
#AddHandler imap-file image
#
# Transfer resources for type image
# (This is the default setting to allow Apache "It worked" pages to be distributed in multiple languages).
#
AddHandler type-map var
#
# The filter allows you to process it before sending it to the client.
#
# to parse the. shtml document containing (SSI) on the server side:
# (to execute this instruction, you also need to add "Includes" to the options directive.) )
#
# AddType text/html. shtml
# Addoutputfilter INCLUDES. shtml
#
# Action lets you define the script that will be executed when a matching media file is invoked. This will reduce
# Repeat input for the URL pathname of those frequently used CGI scripts.
# Format: Action media/type/cgi-script/location
# Format: Action handler-name/cgi-script/location
#
#
# There are three different styles of configurable error response:
# 1) Plain text 2) local redirects 3) external redirects
#
# Some examples:
# errordocument "The server made a boo boo."
# ErrorDocument 404/missing.html
# errordocument 404 "/cgi-bin/missing_handler.pl"
# ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# By applying these instructions, we can create an internationalized error response.
#
# We use the alias to redirect any/error/http_<error>.html.var reply to
# Our multiple language error message collection. Replace it with the correct text.
#
# by adding the following lines, you can change the display of these messages without having to change
# Http_<error>.html.var file.
#
# alias/error/include/"/your/include/path/"
#
# to copy the files under/usr/local/apache2/error/include/to/your/inclue/path/
# to start, you can create your own collection of files, even for each virtual host.
# no matter how your serversignature set, the default include file will show you the
# Aapche version number and your serveradmin email address
#
# internationalized Error documents require Mod_alias,mod_include and mod_negotiation three
Module To activate them, cancel the annotation symbol for the following 30 lines
# alias/error/"/usr/local/apache2/error/"
#
# <directory "/usr/local/apache2/error" >
# allowoverride None
# Options IncludesNOEXEC
# addoutputfilter Includes html
# AddHandler Type-map var
# Order Allow,deny
# Allow from all
# languagepriority en de es fr it nl SV
# forcelanguagepriority prefer fallback
# </Directory>
#
# ErrorDocument 400/error/http_bad_request.html.var
# ErrorDocument 401/error/http_unauthorized.html.var
ErrorDocument 403/error.php
# ErrorDocument 404/error/http_not_found.html.var
# ErrorDocument 405/error/http_method_not_allowed.html.var
# ErrorDocument 408/error/http_request_time_out.html.var
# ErrorDocument 410/error/http_gone.html.var
# ErrorDocument 411/error/http_length_required.html.var
# ErrorDocument 412/error/http_precondition_failed.html.var
# ErrorDocument 413/error/http_request_entity_too_large.html.var
# ErrorDocument 414/error/http_request_uri_too_large.html.var
# ErrorDocument 415/error/http_service_unavailable.html.var
# ErrorDocument 500/error/http_internal_server_error.html.var
# ErrorDocument 501/error/http_not_implemented.html.var
# ErrorDocument 502/error/http_bad_gateway.html.var
# ErrorDocument 503/error/http_service_unavailable.html.var
# ErrorDocument 506/error/http_variant_also_varies.html.var
#
# The following command changes the standard HTTP response behavior to handle a known browser problem.
#
Browsermatch "MOZILLA/2" nokeepalive
Browsermatch "MSIE 4\.0b2;" Nokeepalive downgrade-1.0 force-response-1.0
Browsermatch "RealPlayer 4\.0" force-response-1.0
Browsermatch "java/1\.0" force-response-1.0
Browsermatch "jdk/1\.0" force-response-1.0
#
# The following command turns off redirection of non-GET requests to directories that do not have tail "/".
# These commands fix the problem of Microsoft's DAV approach that does not properly handle redirected Web folders.
# The DAV file system under Apple and Gnome's VFS support for DAV is also used in this way
# for processing.
#
Browsermatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
Browsermatch "^webdrive" redirect-carefully
Browsermatch "^WEBDAVFS/1. [012] "redirect-carefully
Browsermatch "^gnome-vfs" redirect-carefully
#
# allows you to use Url:http://servername/server-status to live through Mod_status
# into and Report server status information. Change. example.com for your own domain name.
#
# <Location/server-status>
# SetHandler Server-status
# Order Deny,allow
# Deny from all
# Allow from. example.com
# </Location>
#
# Allow remote reporting of server configuration information using Url:http://servername/server-info
# (requires MOD_INFO.C support). Change ". example.com" for your own domain name.
#
# <Location/server-info>
# SetHandler Server-info
# Order Deny,allow
# Deny from all
# Allow from. example.com
# </Location>
#
# Proxy Server command, remove the following proxy service available.
#
# <ifmodule Mod_proxy.c>
# proxyrequests on
# <proxy *>
# Order Deny,allow
# Deny from all
# Allow from. example.com
# </Proxy>
#
# Install or turn off http/1.1 "channel" header processing.
# ("full" adds server version information, "block" removes all output "channel" header information.)
# can be set to one of the following options: Off | On | Full | Block
#
# Proxyvia on
# The best way to install a high-speed buffer for the agent service is to remove the annotation symbol for the following lines:
# (no cacheroot, no buffers)
#
# cacheroot "/usr/local/apache2/proxy"
# CacheSize 5
# Cachegcinterval 4
# Cachemaxexpire 24
# Cachelastmodifiedfactor 01
# cachedefaultexpire 1
# NoCache a-domain.com another-domain.edu joes.garage-sale.com
# </IfModule>
# Proxy command ended.
#
# The specific module configuration attached.
#
<ifmodule mod_ssl.c>
Include conf/ssl.conf
</IfModule>
# # Third zone: Virtual host
#
# VirtualHost: You can set up a virtual host container to achieve multiple on your host
# Domain name/host name. Most configuration information uses only the name-based virtual host, so the server
# Don't worry about IP addresses, the following command replaces the virtual host name with the * number.
#
# Before you try to configure your virtual host, see
# url:http://httpd.apache.org/docs-2.0/vhosts/> to get more information.
#
# You can use the command line option '-s ' to verify your virtual host configuration.
#
# Use a name based virtual host.
#
# Namevirtualhost *
#
# Virtual Host Example:
# almost all Apache commands can be used in a virtual host container.
# The first virtual host area is the configuration used to answer requests that are unknown to the service name.
#
# <virtualhost *>
# ServerAdmin Webmaster@dummy-host.example.com
# documentroot/www/docs/dummy-host.example.com
# ServerName Dummy-host.example.com
# ErrorLog Logs/dummy-host.example.com-error_log
# Customlog Logs/dummy-host.example.com-access_log commom
# </virtualHost>