HTTP最新官方配置,配置文件中文版
分类:pc28.am

Apache最新官方配置文件中文版。扶持web服务器管理员更实惠的对Apache实行布署。
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#参照他事他说加以考查NCSA服务器的配置文件,原版由罗布 McCool公布
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:; for detailed information about
# the directives.
#这是Apache server的主配置文件. 它满含配置指令,来提醒服务器
#请参考 精晓关于指令的详细新闻
# 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').
# 1. 决定Apache server的全局操作的授命(全局情形变量).
# 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.
# 2.配置主服务恐怕暗许服务的下令,它针对那多少个被虚构主机以外的乞请作出响应.
#它也包涵虚构主机的部分默许参数
# 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.
# 3. 虚拟主机设置,那使得发往不一样的ip恐怕主机名的央浼可以被子同三个Apache服务# 器处理
# 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 "C:/Program Files/Apache Group/Apache2" will be interpreted by the
# server as "C:/Program Files/Apache Group/Apache2/logs/foo.log".
#布署和日志文件名:要是你所钦命的公文名以”/”在Win3第22中学以盘符:/卡塔尔国起头,服务器将以相对路线来拍卖。假如不以”/”初步,则以相对于ServerRoot不表达,所以对于logs/foo.log来说,当ServerRoot为"C:/Program Files/Apache Group/Apache2”时,则指的是
C:/Program Files/Apache Group/Apache2/logs/foo.log文件
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:apache").
注意,在文件名的定义中,必需用正斜杠,实际不是反斜杠,如c:/apache实际不是c:apache
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#比方轻便了盘符,则以Apache.exe所在的盘符为暗许值
提出在相对路线中永恒使用显式的盘符,那样有扶持杀绝误解
### 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
# can find its configuration files.
#本有的的命令将影响总体Apache服务器,举个例子它所能管理的并发诉求数也许它在哪个地方可以找到其布局文件
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
# ServerRoot: 服务器的布局,错误和日志文件的根目录
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <URL:;);
# you will save yourself a lot of trouble.
#注意:假使将其保存到NFS上依然网络上mounted的文件系统上,然后应该阅读LockFile文书档案,.
# Do NOT add a slash at the end of the directory path.
#毫不在目录的最终加上斜杠
ServerRoot "C:/Program Files/Apache Group/Apache2"
ServerRoot:根目录
#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
ScoreBoardFile: 保存服务器内部的拍卖新闻
即使未定议(默许状态),scoreboard将被封存在无名氏的分享内存段中,并且对于第三方来说,是不足获得的
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#生龙活虎经已定义,应保障Apache的四个调用无法分享同叁个scoreboard. Scoreboard文件必得贮存在可分配的磁盘上
#ScoreBoardFile logs/apache_runtime_status
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#PidFile:当服务器起努时,服务器须求将其经过ID号寄存在这里文件中
PidFile logs/httpd.pid
#
# Timeout: The number of seconds before receives and sends time out.
#Timeout:选取和发送数据的晚点设置,秒数
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#KeepAlive: 是不是扶持持久联接并非每一种诉求建一个老是卡塔尔,设off关闭此成效
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#马克斯KeepAliveRequests:在长久连接时期,所允许的最大央浼数量。设为0意味着不作节制
建议设为较高的数,以拉长品质
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#KeepAliveTimeout:在同二个客商连接中,等待下三个伸手的等候时间。
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
## 常规Server-Pool服务器池的抑扬顿挫(每分钟M数)
# WinNT MPM WinNT 的MPM
# ThreadsPerChild: constant number of worker threads in the server process
ThreadPerChild:服务器进度中劳作的线程数量
# MaxRequestsPerChild: maximum number of requests a server process serves
各个服务进度的最大诉求数
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild 0
</IfModule>
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#Listen:允许你将Apache绑定到钦赐的IP地址或端口,却非默许端口,请同期参考<VirtualHost>指令
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#像上面那样内定侦听的IP地址,制止Apache抢占全体绑定的IP地址
#Listen 12.34.56.78:80
Listen 80
#
# Dynamic Shared Object (DSO) Support
#动态分享对象帮忙DSO
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#为了能够使用模块作用,模块平日以DSO的主意营造,你应当在底下接纳LoadModule行,使得能够在动用前拿到指令的功力。静态编译模块在httpd-1中所列举的卡塔尔无需在那装载
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
#
# ExtendedStatus controls whether Apache will generate "full" status
# information (ExtendedStatus On) or just basic information (ExtendedStatus
# Off) when the "server-status" handler is called. The default is Off.
#扩张状态调整Apache是或不是产生全体的情事消息设为on发生任何卡塔尔,固然设为Off则发出基本的新闻,当与server-status头有关,默许值为Off
#ExtendedStatus On
### Section 2: 'Main' server configuration
#第二部分:主服务配置
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#本节中指令的安装值,将被主服务所使用,主服务响应那么些从没被<VirtualHost>所拍卖的央浼,那个值也为<VirtualHost>容器提供了暗中认可值,你可以在背后的文本中定义
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
装有这个指令将应际而生在<VirtualHost>容器中,这一个设定值将要概念virtual host时被覆写。
#
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. [email protected]
# ServerAdmin:你之处,当系统故障时,能够给您发email。此地方出以往那个由劳务器生成的页面上,如出错文档。比方:[email protected]
ServerAdmin [email protected]
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#ServerNaem定义了server名称和端口号,用以标注自个儿的身价。平日能够自行定义,建议显式地定义,幸免起动时出错
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#若无科学定义主机的DNS,服务器发生的重定向将不会做事,同不常候参谋UseCanonicalName指令。
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#要是您没有登记DNS名字,请在此输入IP地址。
您能够在其余境况下行使ip地址,那也运用得重定向变得灵活
ServerName www.moers.com:80
#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client. When set "On", Apache will use the value of the
# ServerName directive.
#UseCanonicalName:决定Apaceh怎么样创设自定参照他事他说加以考察ULANDL,和SEKugaVE安德拉_NAME及SERVER_PORT变量
当设为Off时,Apache将利用顾客端给出的域名和端口。当设为On时,Apache将接收ServerName指令
UseCanonicalName Off
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#DocumentRoot:服务器文书档案放置目录。在暗中同意景况下,全部的央求都从这里开端,除了暗号和别大将改指它处以外。
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#各类可供Apache访谈的目录,能够陈设成允许或取缔哪些服务和天性包括其子目录卡塔尔国
# First, we configure the "default" to be a very restrictive set of
# features.
#率先,大家定义叁个暗中同意的十三分严苛的配备
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#瞩目,从那点往前,你必须要许可有些特殊的功能,所以只要有些作用不可能如你所愿,要承保您在在下述中启用了该功效。
#
# This should be changed to whatever you set DocumentRoot to.
# 那将转移您对DocumentRoot的设置
<Directory "C:/Program Files/Apache Group/Apache2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
或然的值为None,All恐怕随意组合
#  Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# 索引满含FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#小心MultiViews被显式地Options All,
# The Options directive is both complicated and important. Please see
#
# for more information.
#选料指令既复杂又主要,请参阅
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#  Options FileInfo AuthConfig Limit
#AllowOverride 调整什么指令能够参预到.htaccess中,能够是All,None,或许组合关键字
AllowOverride None
#
# Controls who can get stuff from this server.
#决定何人能够可以访谈此服务
Order allow,deny
Allow from all
</Directory>
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received. Be especially careful to use
# proper, forward slashes here. On Windows NT, "Personal/My Website"
# is a more appropriate choice.
# UserDir: 客户的home的称呼,当选取到~user的哀求时。
请小心正确使用”/”. 在WinNT上,”Personal/My Website”是更适用的选项
UserDir "My Documents/My Website"
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#调整UserDir目录,以下是三个例子,那个目录是只读的
# You must correct the path for the root to match your system's configured
# user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"
# or whichever, as appropriate.
#您一定要更改root目录,与系统设置相称,如客户目录是C:/WinNT/profiles/*/My Documents/My Website恐怕此外切合的
#<Directory "C:/Documents and Settings/*/My Documents/My Website">
#AllowOverride FileInfo AuthConfig Limit
#Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#<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: sets the file that Apache will serve if a directory
# is requested.
#DirectoryIndex: Apache服务器将在以五个目录的样式响应服务
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#index.html变量文件意气风发种炫丽卡塔 尔(阿拉伯语:قطر‎将直接传送内容。MultiViews选项能够用来同朝气蓬勃的目标,可是要慢得多
DirectoryIndex index.html index.html.var
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#AccessFileName: 用来探求各类目录下额外的配备指令的配备文件名,同期参考AllowOverride(允许重载)指令
#Acce
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#上面两行,阻址Web客商端访问.htaccess和htpasswd(访问设定和密码)的公文
#
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
#
# TypesConfig describes where the mime.types file (or equivalent) is
# to be found.
# TypesConfig,描述在哪个地方找到mime型别
TypesConfig conf/mime.types
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
要是服务器不能够分明文书档案的型别,将动用私下认可的MIME型别,举个例子依据扩张名
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#生机勃勃经您的服务器主要包涵text/html文书档案,”text/plain”正是叁个好的取值。若是你的大部剧情是binary(二进制)的,如应用程序或图片,你或然希望利用application/octet-stream,使得浏览器试图呈现二进制数据,固然它们是文件
DefaultType text/plain
#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
# mod_mime_magic模块,允许服务器依据内容提示来鉴定区别文件型别。MIMEMagicFile指令告知模块“内容提醒”应到哪儿找。
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
HostNameLookups: 客户日志大概仅其IP地址,如www.apache.org(on) 恐怕204.62.129.132
(off).私下认可为值设为off相比较好,假使期望将此置为on将象征第三遍客商诉求都起码要询问一遍nameserver.
#
HostnameLookups Off
#
# EnableMMAP: Control whether memory-mapping is used to deliver
# files (assuming that the underlying OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. On some systems, turning it off (regardless of
# filesystem) can improve performance; for details, please see
#
# EnableMMAP: 调控是不是因而内部存款和储蓄器映射的点子传递文件(须得操作系统辅助)
暗许值为on; 假设您选择NSF加载的文件系统经常在linux下卡塔尔,应置为off. 在少数系统上,置off,不管采用什么文件系统,能够升高效能,详细的情况,请参阅文书档案
#EnableMMAP off
#
# EnableSendfile: Control whether the sendfile kernel support is
# used to deliver files (assuming that the OS supports it).
# The default is on; turn this off if you serve from NFS-mounted
# filesystems. Please see
#
# EnableSendfile: 调节内核传送文件是不是支持必要OS帮衬卡塔 尔(英语:State of Qatar)。默感觉on,假使应用NFS,则利用off
#EnableSendfile off
#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#ErrorLog: 出错日志文件
若是你想为设想主机定义Errorlog指令,则该设想主机的错误消息将被记录到那边
ErrorLog logs/error.log
#
# LogLevel: Control the number of messages logged to the error.log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
# LogLever: 日志品级,与log4j相近,译者注卡塔尔国,决定怎么着等级的失误音信将被记录,如debug,info,notice,warn,error, crit,alert,emerg等,在设定品级以上的音信就能被记录(译者注).
LogLevel warn
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# 日志格式(与log4j雷同)
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 enable mod_logio.c to use %I and %O
#LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
未完待续……

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:; for detailed information.
# In particular, see
# <URL:;
# for a discussion of each configuration directive.
#
# 那是Apache server的主配置文件. 它饱含配置指令,来提醒服务器。
# 参考 领会关于指令的详细新闻。
# 另外,参看 获取各类配置指令的座谈。

目的,在Linux进行apache2.2版本和tomcat6版本的虚拟主机配置。有个别时候apache2.2是不可能将须要转发给tomcat的(举例直接管理静态页面包车型客车来得卡塔尔,所以大家向来用ajp代理之类的回顾计策就没办法区分动态项目和静态项目管理情势了。在此个地点,tomcat早有预备,推出了tomcat-connectors举行了扶持。

  1. Use notepad to open httpd.conf config file. Make use the line "LoadModule rewrite_module modules/mod_rewrite.so" is un-commented.

  2. Under "<directory XXX></directory>" section, change the line "AllowOverride None" to "AllowOverride All".

  3. Change the line "AccessFileName .htaccess" to "AccessFileName htaccess". This is because in Windows, we can't have a file with filename that starts with a dot.

  4. Save the changed file and restart Apache Windows Service. You can then use the file htaccess to process your url rewritting.

# # Based upon the NCSA server configuration files originally by Rob McCool...

# 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').
# 1.说了算Apache server的大局操作的吩咐(全局情状变量)。
#
# 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.
# 2. 配置主服务照旧私下认可服务的授命,它针对那么些被设想主机以外的伏乞作出响应。
# 它也带有设想主机的片段暗中认可参数。
#
# 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.
# 3. 设想主机设置,那使得发往差异的ip大概主机名的倡议能够被子同一个Apache服务器管理。

  1、apache已经完全安装到了/usr/local/apache2.2索引下了,web服务端口是80。运营后是apache的it works!提醒

#
# This is the main Apache http server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:; for detailed information.
# In particular, see
# <URL:;
# for a discussion of each configuration directive.
#
# 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. 
#
# 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/access_log"
# with ServerRoot set to "/usr/local/apache2" will be interpreted by the
# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
# will be interpreted as '/logs/access_log'.
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:apache").
# If a drive letter is omitted, the drive on which httpd.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths to avoid confusion.

# 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 "E:/usr/Apache2.2" will be interpreted by the
# server as "E:/usr/Apache2.2/logs/foo.log".
#
# 配置和日志文件名:如若您所内定的文本名以“/”(在Win3第22中学以“盘符:/”卡塔尔国起首,
# 服务器将以相对路线来管理。假诺文件名不以“/”开端,则以相对路线管理,
# 相对于服务器根(Serverroot卡塔 尔(英语:State of Qatar)。因而“logs/foo.log”,若是服务器根目录
# 为“E:/usr/Apache2.2”,则服务器解释为“E:/usr/Apache2.2/logs/foo.log”。

  2、tomcat6已经设置到了/usr/local/tomcat6目录下了。8009端口开采,web服务端口是8080。运行后是tomcat的暗中同意页。

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "c:/Apache"

#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:apache").
# 注意:在文书名的定义中,必需用正斜杠,并不是反斜杠。(比如,“c:/apache”,实际不是“c:apache”)
#
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default. It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
# 借使轻松了盘符,则以Apache.exe所在的盘符为暗许值。建议在相对路线中彰着
# 钦点盘符,以制止混乱。

  作者在tomcat6的webapps下黄金时代度配备了四个jsp项目MicTrader 和MicSeller。通过

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory
# for individual mutexes, or change the global defaults
#
# Uncomment and change the directory if mutexes are file-based and the default
# mutex file directory is not on a local disk or is not appropriate for some
# other reason.
#
# Mutex default:logs

# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum number of requests a server process serves
# ThreadsPerChild:每一种服务进度中的专业线程常数
# MaxRequestsPerChild:服务进程中允许的最大央浼数目
ThreadsPerChild 250
MaxRequestsPerChild 0

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 8801

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
# 建议服务器保存其布局、出错和日志文件等的根目录
#
# Do not add a slash at the end of the directory path. If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk. If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
# 不要在目录的末尾加上斜杠。假如您想将ServerRoot指向非当地硬盘上,请加多卷到本地硬盘上。
# 若是你想分享 ServerRoot 给多少个HTTPD镜像服务,你必得改过LockFile和PidFile。
#
ServerRoot "E:/usr/Apache2.2"

  3、jdk已经设置了,并且上边的七个服务业已可用了

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule allowmethods_module modules/mod_allowmethods.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_core_module modules/mod_authn_core.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule authz_core_module modules/mod_authz_core.so
#LoadModule authz_dbd_module modules/mod_authz_dbd.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule buffer_module modules/mod_buffer.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule cache_disk_module modules/mod_cache_disk.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
#LoadModule data_module modules/mod_data.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule dumpio_module modules/mod_dumpio.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule headers_module modules/mod_headers.so
#LoadModule heartbeat_module modules/mod_heartbeat.so
#LoadModule heartmonitor_module modules/mod_heartmonitor.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_debug_module modules/mod_log_debug.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule lua_module modules/mod_lua.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_express_module modules/mod_proxy_express.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_html_module modules/mod_proxy_html.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
#LoadModule ratelimit_module modules/mod_ratelimit.so
#LoadModule reflector_module modules/mod_reflector.so
#LoadModule remoteip_module modules/mod_remoteip.so
#LoadModule request_module modules/mod_request.so
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule sed_module modules/mod_sed.so
#LoadModule session_module modules/mod_session.so
#LoadModule session_cookie_module modules/mod_session_cookie.so
#LoadModule session_crypto_module modules/mod_session_crypto.so
#LoadModule session_dbd_module modules/mod_session_dbd.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule slotmem_plain_module modules/mod_slotmem_plain.so
#LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
#LoadModule socache_dbm_module modules/mod_socache_dbm.so
#LoadModule socache_memcache_module modules/mod_socache_memcache.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule watchdog_module modules/mod_watchdog.so
#LoadModule xml2enc_module modules/mod_xml2enc.so
LoadModule php5_module "c:/php/php5apache2_4.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
# Listen:允许你绑定Apache服务到钦点的IP地址和端口上,以取代私下认可值。请同不平日间仿照效法<VirtualHost>
# 指令。
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
# 像上面那样使Apache只在钦命的IP地址上监听,防止御它在IP地址0.0.0.0上监听。
#
#Listen 12.34.56.78:80
Listen 8080

  4、linux的RedHat4本子,相关编写翻译包已经ok了

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

#
# Dynamic Shared Object (DSO) Support
# 动态分享对象(DSO卡塔尔扶持
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
# 为了能够运用那多少个以DSO格局编写翻译的模块中的函数,你必需放置相应的“LoadModule”行在此边,以便
# 包含在这里后的通令在动用早先激活。
# 那个静态编写翻译的模块(即以“httpd -l”列出的模块)则无需在这里处加载。
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
#LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule status_module modules/mod_status.so
#LoadModule unique_id_module modules/mod_unique_id.so
LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule ssl_module modules/mod_ssl.so
LoadModule php5_module "E:/usr/php/php5apache2_2.dll"

  下载:

</IfModule>

# 配置 php.ini 的路径
PHPIniDir "E:/usr/php"

1、connector包:Apache Tomcat Connectors (mod_jk) 1.2.30 for Linux i586

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

# 'Main' server configuration
# 主服务配置
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# 本节中指令的装置值,将被主服务所使用,主服务响应那么些未有被<VirtualHost>所处理的央浼,
# 那个值也为<VirtualHost>容器提供了私下认可值,你能够在后头的文书中定义
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
# 全体这个指令将面世在<VirtualHost>容器中,这个设定值就要概念virtual host时被覆写。

命令:wget 

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin admin@example.com

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
# ServerAdmin: 你的地址,当系统故障时,能够给您发email。
# 此地址出将来这多少个由服务器生成的页面上,如出错文书档案。比如:admin@your-domain.com
#
ServerAdmin indian@163.com

注意:

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 127.0.0.1

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
# ServerNaem 定义了server名称和端口号,用以标记自身的身份。
# 常常能够自动定义,提出明确地钦命它,制止起动时出错
# If your host doesn't have a registered DNS name, enter its IP address here.
# 若是您未曾注册DNS名字,请在这里边输入IP地址。
ServerName www.kysf.net:8080

2、下载后的so文件名:mod_jk-1.2.30-httpd-2.2.X.so
将文件拷贝一视同仁命名到:/usr/local/apache2.2/modules/mod_jk.so

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
    AllowOverride none
    Require all denied
</Directory>

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
# DocumentRoot: 你的文书档案的根目录。暗许景况下,全数的央浼都从今以后间发轫,
# 但是足以采纳标记链接和外号来指向到别的的职位。
#
DocumentRoot "E:/usr/Apache2.2/htdocs"

给文件予以系统读写权限:cd /usr/local/apache2.2/modules 

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
# 每一个可供Apache访谈的目录,能够配备成允许和(或卡塔尔国防止哪些服务和特点(满含其子目录卡塔 尔(英语:State of Qatar)
#
# First, we configure the "default" to be a very restrictive set of
# features.
# 首先,大家定义多少个暗中认可的十二分严苛的配备
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

chmod 777 mod_jk.so

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "c:/wordpress"
<Directory "c:/wordpress">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    #
    # for more information.
    #
    Options Indexes FollowSymLinks

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
# 注意从这里早前你肯定要刚烈地允许哪些特别的风味能够被选拔。
# 所以,若是Apache未有象你所期望的这样行事的话, 请检查你是还是不是在底下鲜明的内定它可用。

3、进行有关文书的布局(操作前请备份大器晚成份)

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

#
# This should be changed to whatever you set DocumentRoot to.
# 那将修正您对DocumentRoot的装置
#
<Directory "E:/usr/Apache2.2/htdocs">

(1卡塔尔国、配置httpd.conf。注意内部标明add by kongqz的地点。都以自家加上去的。首借使进展了mod_jk.so模块加载,以致虚构主机的布局多少个布局专门的学问

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
    DirectoryIndex index.php
</Directory>

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
#Options:那几个命令的值能够是“None”,“All”,可能下列选项的自便组合:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

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

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# 注意,“MultiViews”必须被显式的钦点,“Options All”不能够为您提供这些天性。
#
# The Options directive is both complicated and important. Please see
#
# for more information.
#
# options 指令既复杂又重要,请参见
# 获取越来越多消息。
#
Options Indexes FollowSymLinks

(2)、增加mod_jk.conf配置文件。这里笔者将host表中的ip指向服务器,并将域名seller.linuxidc.com和trader.linuxidc.com也同盟指向到此服务器

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
    Require all denied
</Files>

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride 调整那么些被停放在.htaccess文件中的指令。
# 它能够是“All”,“None”,也许下列指令的组成:
# Options FileInfo AuthConfig Limit
#
AllowOverride None

  1. JkWorkersFile /usr/local/apache2.2/conf/workers.properties  
  2. # Where to put jk logs   
  3. JkLogFile /usr/local/apache2.2/logs/mod_jk.log  
  4. # Set the jk log level [debug/error/info]   
  5. JkLogLevel info  
  6. # Select the log format   
  7. JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" 
  8. # JkOptions indicate to send SSL KEY SIZE,    
  9. JkOptions   ForwardKeySize  ForwardURICompat -ForwardDirectories  
  10. # JkRequestLogFormat set the request format    
  11. JkRequestLogFormat "%w %V %T"  
  12. JkMount /servlet/*  worker1   
  13. JkMount /*.jsp worker1   
  14. JkMount /MicSeller/* worker1   
  15. JkMount /MicTrader/* worker1  

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error.log"

#
# Controls who can get stuff from this server.
#
# 调控什么模块可以拿走劳动。
#
Order allow,deny
Allow from all

(3卡塔尔、扩充安排文件workers.properties

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

</Directory>

  1. # Defining a worker named worker1 and of type ajp13   
  2. worker.list=worker1  
  3. # Set properties for worker1   
  4. worker.worker1.type=ajp13     
  5. worker.worker1.host=localhost     
  6. worker.worker1.port=8009   
  7. worker.worker1.lbfactor=50     
  8. worker.worker1.cachesize=10     
  9. worker.worker1.cache_timeout=600     
  10. worker.worker1.socket_keepalive=1     
  11. worker.worker1.socket_timeout=300  

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
    LogFormat "%h %l %u %t "%r" %>s %b" common

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# DirectoryIndex: 当央浼是三个目录时,Apache向客商提供劳务的文本名。(即私下认可文书档案名。-译者注。卡塔 尔(英语:State of Qatar)
#
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

4、进行访问:

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
    </IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
# #下边包车型客车安装是幸免.htaccess和.htpasswd(访谈设定和密码卡塔尔国文件被Web客户查看。
#
<FilesMatch "^.ht">
Order allow,deny
Deny from all
</FilesMatch>

极其上面包车型地铁多少个文件的配置,小编就能够透过

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog "logs/access.log" common

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
# ErrorLog: 错误日志文件地方。
# 假设您未曾经在<VirtualHost>内定义ErrorLog指令,这一个虚构主机的错误消息
# 将记录在那地。如果您在<VirtualHost>定义了ErrorLog,这个错误消息将记录在您所
# 定义的文书里,并非这里定义的文本。
#
ErrorLog logs/error.log

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog "logs/access.log" combined
</IfModule>

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
# LogLevel: 调节记录在错误日志文件中的日志新闻数量。
# 大概的值包含: debug, info, notice, warn, error, crit, alert, emerg.
#
LogLevel warn

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo

<IfModule log_config_module>
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
# 上边包车型地铁参数设置是为CustomLog指令定义格式别称(看上面)。
#
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
LogFormat "%h %l %u %t "%r" %>s %b" common

寻访钦点的花色了

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
#
# 你供给设置了mod_logio.c模块工夫利用%I和%O
#
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
</IfModule>

5、要是是静态html文件种类的拜访如何是好?

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "c:/Apache/cgi-bin/"

#
# The location and format of the access logfile (Common Logfile Format).
# If you do not define any access logfiles within a <VirtualHost>
# container, they will be logged here. Contrariwise, if you *do*
# define per-<VirtualHost> access logfiles, transactions will be
# logged therein and *not* in this file.
#
# 钦点访谈日志文件的职分和格式(日常日志格式卡塔尔国。
# 假诺您从未在<VirtualHost>内定义那么些命令,管理音讯将记录在这,
# 如若您定义了那个命令,则管理音讯记录在你钦定的义务,并不是那时候定义的职位。
#
CustomLog logs/access.log common

就在我们的http.conf项目中的配置更正如下:

</IfModule>

#
# If you prefer a logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
#
# 倘让你想要使用三个文件记录access,agent和referer新闻(组合日志格式卡塔 尔(英语:State of Qatar),
# 你可以如下概念那些命令:
#
#CustomLog logs/access.log combined
</IfModule>

<VirtualHost *:80>
    DocumentRoot /usr/local/static
    ServerName static.linuxidc.com
    ErrorLog logs/static-error_log.log
    CustomLog logs/static-access_log.log common
 #   JkMount /* worker1
</VirtualHost>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock cgisock
</IfModule>

<IfModule alias_module>
#
# Redirect: Allows you to tell clients about documents that used to
# exist in your server's namespace, but do not anymore. The client
# will make a new request for the document at its new location.
#
# Redirect:允许你用二个已存在的域名描述文书档案,但无法用全部的域名(描述卡塔尔国。
# 客商端将用那么些新名称发出叁个新的呼吁。
#
# Example:
# Redirect permanent /foo

纵使不做转账了,将JkMount 那行去掉

#
# "c:/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "c:/Apache/cgi-bin">
    AllowOverride None
    Options None
    Require all granted
</Directory>

#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
#
#Alias: 映射web路径到文件系统路线,平常用于访问不在DocumentRoot里面包车型客车始末
#
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL. You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.
#
# 假使web路线中有后缀“/”,则服务器要求有后缀“/”来叙述UPRADOL。你也得以用 <Directory> 片段
# 允许访谈文件系统路线。

6、即使是自家想同盟php也生机勃勃并配置到三个节点上可以吗?

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig conf/mime.types

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the target directory are treated as applications and
# run by the server when requested rather than as documents sent to the
# client. The same rules about trailing "/" apply to ScriptAlias
# directives as to Alias.
#
# ScriptAlias: 内定包蕴服务脚本的目录。
# ScriptAliases本质上与Aliases一样,除了这里的文书档案在伸手时做为程序管理和周转,
# 实际不是用作文书档案件发生送到客商端。尾巴部分的“/”法则与Alias相同。
#
ScriptAlias /cgi-bin/ "E:/usr/Apache2.2/cgi-bin/"

由此测验,在windows下没至极。安装收尾php后,直接配备安排php相关模块在httpd.conf中,照旧老样子,只要不内定JkMount.乞求就不会转变到tomcat。

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

</IfModule>

小结:上面小编只是安插了java项目标虚构主机配置方案。越多的时候是为了合营php也许apache间接举行静态文件的访谈。就算只是想在tomcat前放个apache,有更简明的措施,ajp反向代理,直接实行8009端口转载。

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

#
# "E:/usr/Apache2.2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
# 更正 "E:/usr/Apache2.2/cgi-bin" 为你的 ScriptAlias(脚本外号卡塔尔。
#
<Directory "E:/usr/Apache2.2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

图片 1

    # For type maps (negotiated resources):
    #AddHandler type-map var

#
# Apache parses all CGI scripts for the shebang line by default.
# This comment line, the first line of the script, consists of the symbols
# pound (#) and exclamation (!) followed by the path of the program that
# can execute this specific script. For a perl script, with perl.exe in
# the C:Program FilesPerl directory, the shebang line should be:
#
# 暗中同意的,Apache 将总体行解释为 CGI 脚本。
# 注释行、脚本第大器晚成行、带#!的顺序路线,都能实行这一个钦赐的本子。比方多少个perl 脚本,
# 在 C:Program FilesPerl 中有 perl.exe 解释程序,整个行写为:
#
#!c:/program files/perl/perl

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

# Note you _must_not_ indent the actual shebang line, and it must be the
# first line of the file. Of course, CGI processing must be enabled by
# the appropriate ScriptAlias or Options ExecCGI directives for the files
# or directory in question.
#
# However, Apache on Windows allows either the Unix behavior above, or can
# use the Registry to match files by extention. The command to execute
# a file of this type is retrieved from the registry by the same method as
# the Windows Explorer would use to handle double-clicking on a file.
# These script actions can be configured from the Windows Explorer View menu,
# 'Folder Options', and reviewing the 'File Types' tab. Clicking the Edit
# button allows you to modify the Actions, of which Apache 1.3 attempts to
# perform the 'Open' Action, and failing that it will try the shebang line.
# This behavior is subject to change in Apache release 2.0.
#
# Each mechanism has it's own specific security weaknesses, from the means
# to run a program you didn't intend the website owner to invoke, and the
# best method is a matter of great debate.
#
# To enable the this Windows specific behavior (and therefore -disable- the
# equivilant Unix behavior), uncomment the following directive:
#
#ScriptInterpreterSource registry
#
# The directive above can be placed in individual <Directory> blocks or the
# .htaccess file, with either the 'registry' (Windows behavior) or 'script'
# (Unix behavior) option, and will override this server default option.
#

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402
#

<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types

#
# MaxRanges: Maximum number of Ranges in a request before
# returning the entire resource, or one of the special
# values 'default', 'none' or 'unlimited'.
# Default setting is to accept 200 Ranges.
#MaxRanges unlimited

#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
#EnableSendfile on

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# For type maps (negotiated resources):
#AddHandler type-map var

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf

#增添 .PHP 文件扩充
AddType application/x-httpd-php .php
</IfModule>

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type. The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile conf/magic

# Language settings
#Include conf/extra/httpd-languages.conf

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402
#

# User home directories
#Include conf/extra/httpd-userdir.conf

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files. This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

# Supplemental configuration
#
# The configuration files in the conf/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

# Fancy directory listings
#Include conf/extra/httpd-autoindex.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Language settings
#Include conf/extra/httpd-languages.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include conf/extra/proxy-html.conf
</IfModule>

# User home directories
#Include conf/extra/httpd-userdir.conf

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
#
# uncomment out the below to deal with user agents that deliberately
# violate open standards by misusing DNT (DNT *must* be a specific
# end-user choice)
#
#<IfModule setenvif_module>
#BrowserMatch "MSIE 10.0;" bad_DNT
#</IfModule>
#<IfModule headers_module>
#RequestHeader unset DNT env=bad_DNT
#</IfModule>

# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf

MaxRequestsPerChild 10

# Virtual hosts
#Include conf/extra/httpd-vhosts.conf

AccessFileName htaccess

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

 

# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf

Php.ini 基本是原先的:

# Various default settings
#Include conf/extra/httpd-default.conf

[PHP]

# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

;;;;;;;;;;;;;;;;;;;
; About php.ini   ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

你可能感兴趣的散文:

  • Apache配置文件中的deny与allow小结
  • Apache服务器主配置文件httpd.conf详细明白
  • apache .htaccess文件详细明白和布署技能总括
  • 纠正apache配置文件去除thinkphp url中的index.php
  • 让Apache帮忙shtml实现include文件剖判的布署形式
  • apache 配置文件表达
  • Apache服务的尤为重要目录和布局文件详细解释

; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
; 1. SAPI module specific location.
; 2. The PHPRC environment variable. (As of PHP 5.2.0)
; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
; 4. Current working directory (except CLI)
; 5. The web server's directory (for SAPI modules), or directory of PHP
; (otherwise in Windows)
; 6. The directory from the --with-config-file-path compile time option, or the
; Windows directory (C:windows or C:winnt)
; See the PHP docs for more specific information.
;

; The syntax of the file is extremely simple.  Whitespace and lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though
; they might mean something in the future.

; Directives following the section heading [PATH=/www/mysite] only
; apply to PHP files in the /www/mysite directory.  Directives
; following the section heading [HOST=www.example.com] only apply to
; PHP files served from www.example.com.  Directives set in these
; special sections cannot be overridden by user-defined INI files or
; at runtime. Currently, [PATH=] and [HOST=] sections only work under
; CGI/FastCGI.
;

; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
; Directives are variables used to configure PHP or PHP extensions.
; There is no name validation.  If PHP can't find an expected
; directive because it is not set or is mistyped, a default value will be used.

; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
; previously set variable or directive (e.g. ${foo})

; Expressions in the INI file are limited to bitwise operators and parentheses:
; |  bitwise OR
; ^  bitwise XOR
; &  bitwise AND
; ~  bitwise NOT
; !  boolean NOT

; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.

; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:

;  foo =         ; sets foo to an empty string
;  foo = None    ; sets foo to an empty string
;  foo = "None"  ; sets foo to the string 'None'

; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.

;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;
; PHP comes packaged with two INI files. One that is recommended to be used
; in production environments and one that is recommended to be used in
; development environments.

; php.ini-production contains settings which hold security, performance and
; best practices at its core. But please be aware, these settings may break
; compatibility with older or less security conscience applications. We
; recommending using the production ini in production and testing environments.

; php.ini-development is very similar to its production variant, except it's
; much more verbose when it comes to errors. We recommending using the
; development version only in development environments as errors shown to
; application users can inadvertently leak otherwise secure information.

;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
; The following are all the settings which are different in either the production
; or development versions of the INIs with respect to PHP's default behavior.
; Please see the actual settings later in the document for more details as to why
; we recommend these changes in PHP's behavior.

; display_errors
;   Default Value: On
;   Development Value: On
;   Production Value: Off

; display_startup_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;   Development Value: E_ALL
;   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

; html_errors
;   Default Value: On
;   Development Value: On
;   Production value: On

; log_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: On

; max_input_time
;   Default Value: -1 (Unlimited)
;   Development Value: 60 (60 seconds)
;   Production Value: 60 (60 seconds)

; output_buffering
;   Default Value: Off
;   Development Value: 4096
;   Production Value: 4096

; register_argc_argv
;   Default Value: On
;   Development Value: Off
;   Production Value: Off

; request_order
;   Default Value: None
;   Development Value: "GP"
;   Production Value: "GP"

; session.bug_compat_42
;   Default Value: On
;   Development Value: On
;   Production Value: Off

; session.bug_compat_warn
;   Default Value: On
;   Development Value: On
;   Production Value: Off

; session.gc_divisor
;   Default Value: 100
;   Development Value: 1000
;   Production Value: 1000

; session.hash_bits_per_character
;   Default Value: 4
;   Development Value: 5
;   Production Value: 5

; short_open_tag
;   Default Value: On
;   Development Value: Off
;   Production Value: Off

; track_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

; url_rewriter.tags
;   Default Value: "a=href,area=href,frame=src,form=,fieldset="
;   Development Value: "a=href,area=href,frame=src,input=src,form=fakeentry"
;   Production Value: "a=href,area=href,frame=src,input=src,form=fakeentry"

; variables_order
;   Default Value: "EGPCS"
;   Development Value: "GPCS"
;   Production Value: "GPCS"

;;;;;;;;;;;;;;;;;;;;
; php.ini Options  ;
;;;;;;;;;;;;;;;;;;;;
; Name for user-defined php.ini (.htaccess) files. Default is ".user.ini"
;user_ini.filename = ".user.ini"

; To disable this feature set this option to empty value
;user_ini.filename =

; TTL for user-defined php.ini files (time-to-live) in seconds. Default is 300 seconds (5 minutes)
;user_ini.cache_ttl = 300

;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

; Enable the PHP scripting language engine under Apache.
;
engine = On

; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.
; Default Value: On
; Development Value: Off
; Production Value: Off
;
short_open_tag = Off

; Allow ASP-style <% %> tags.
;
asp_tags = Off

; The number of significant digits displayed in floating point numbers.
;
precision = 14

; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.
; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo. You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.
; Note: Output buffering can also be controlled via Output Buffering Control
;   functions.
; Possible Values:
;   On = Enabled and buffer is unlimited. (Use with caution)
;   Off = Disabled
;   Integer = Enables the buffer and sets its maximum size in bytes.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
;
output_buffering = 4096

; You can redirect all of the output of your scripts to a function.  For
; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
;   directive. Instead, explicitly set the output handler using ob_start().
;   Using this ini directive may cause problems unless you know what script
;   is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
;   and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
;   Instead you must use zlib.output_handler.
;
;output_handler =

; Transparent output compression using the zlib library
; Valid values for this option are 'off', 'on', or a specific buffer size
; to be used for compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
;   outputs chunks that are few hundreds bytes each as a result of
;   compression. If you prefer a larger chunk size for better
;   performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
;   output_handler, or otherwise the output will be corrupted.
;
zlib.output_compression = Off

;
;zlib.output_compression_level = -1

; You cannot specify additional output handlers if zlib.output_compression
; is activated here. This setting does the same as output_handler but in
; a different order.
;
;zlib.output_handler =

; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block.  This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block.  Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.
;
; Note: This directive is hardcoded to On for the CLI SAPI
implicit_flush = Off

; The unserialize callback function will be called (with the undefined class'
; name as parameter), if the unserializer finds an undefined class
; which should be instantiated. A warning appears if the specified function is
; not defined, or if the function doesn't include/implement the missing class.
; So only set this entry, if you really want to implement such a
; callback-function.
unserialize_callback_func =

; When floats & doubles are serialized store serialize_precision significant
; digits after the floating point. The default value ensures that when floats
; are decoded with unserialize, the data will remain the same.
serialize_precision = 17

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;
;open_basedir =

; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;
disable_functions =

; This directive allows you to disable certain classes for security reasons.
; It receives a comma-delimited list of class names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;
disable_classes =

; Colors for Syntax Highlighting mode.  Anything that's acceptable in
; <span > would work.
;
;highlight.string  = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.default = #0000BB
;highlight.html    = #000000

; If enabled, the request will be allowed to complete even if the user aborts
; the request. Consider enabling it if executing long requests, which may end up
; being interrupted by the user or a browser timing out. PHP's default behavior
; is to disable this feature.
;
;ignore_user_abort = On

; Determines the size of the realpath cache to be used by PHP. This value should
; be increased on systems where PHP opens many files to reflect the quantity of
; the file operations performed.
;
;realpath_cache_size = 16k

; Duration of time, in seconds for which to cache realpath information for a given
; file or directory. For systems with rarely changing files, consider increasing this
; value.
;
;realpath_cache_ttl = 120

; Enables or disables the circular reference collector.
;
zend.enable_gc = On

; If enabled, scripts may be written in encodings that are incompatible with
; the scanner.  CP936, Big5, CP949 and Shift_JIS are the examples of such
; encodings.  To use this feature, mbstring extension must be enabled.
; Default: Off
;zend.multibyte = Off

; Allows to set the default encoding for the scripts.  This value will be used
; unless "declare(encoding=...)" directive appears at the top of the script.
; Only affects if zend.multibyte is set.
; Default: ""
;zend.script_encoding =

;;;;;;;;;;;;;;;;;
; Miscellaneous ;
;;;;;;;;;;;;;;;;;

; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header).  It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
;
expose_php = On

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
;
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.
; Note: This directive is hardcoded to -1 for the CLI SAPI
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
;
max_input_time = 60

; Maximum input variable nesting level
;
;max_input_nesting_level = 64

; How many GET/POST/COOKIE input variables may be accepted
; max_input_vars = 1000

; Maximum amount of memory a script may consume (128MB)
;
memory_limit = 128M

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; This directive informs PHP of which errors, warnings and notices you would like
; it to take action for. The recommended way of setting values for this
; directive is through the use of the error level constants and bitwise
; operators. The error level constants are below here for convenience as well as
; some common settings and their meanings.
; By default, PHP is set to take action on all errors, notices and warnings EXCEPT
; those related to E_NOTICE and E_STRICT, which together cover best practices and
; recommended coding standards in PHP. For performance reasons, this is the
; recommend error reporting setting. Your production server shouldn't be wasting
; resources complaining about best practices and coding standards. That's what
; development servers and development settings are for.
; Note: The php.ini-development file has this setting as E_ALL. This
; means it pretty much reports everything which is exactly what you want during
; development and early testing.
;
; Error Level Constants:
; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 5.4.0)
; E_ERROR           - fatal run-time errors
; E_RECOVERABLE_ERROR  - almost fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_STRICT          - run-time notices, enable to have PHP suggest changes
;                     to your code which will ensure the best interoperability
;                     and forward compatibility of your code
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
; E_DEPRECATED      - warn about code that will not work in future versions
;                     of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
;   E_ALL (Show all errors, warnings and notices including coding standards.)
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices)
;   E_ALL & ~E_NOTICE & ~E_STRICT  (Show all errors, except for notices and coding standards warnings.)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
;
error_reporting = E_ALL

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; It's recommended that errors be logged on production servers rather than
; having the errors sent to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
;
display_errors = On

; The display of errors which occur during PHP's startup sequence are handled
; separately from display_errors. PHP's default behavior is to suppress those
; errors from clients. Turning the display of startup errors on can be useful in
; debugging configuration problems. But, it's strongly recommended that you
; leave this setting off on production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off
;
display_startup_errors = On

; Besides displaying errors, PHP can also log errors to locations such as a
; server-specific log, STDERR, or a location specified by the error_log
; directive found below. While errors should not be displayed on productions
; servers they should still be monitored and logging is a great way to do that.
; Default Value: Off
; Development Value: On
; Production Value: On
;
log_errors = On

; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
;
log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line unless ignore_repeated_source is set true.
;
ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; source lines.
;
ignore_repeated_source = Off

; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This has only effect in a debug compile, and if
; error reporting includes E_WARNING in the allowed list
;
report_memleaks = On

; This setting is on by default.
;report_zend_debug = 0

; Store the last error/warning message in $php_errormsg (boolean). Setting this value
; to On can assist in debugging and is appropriate for development servers. It should
; however be disabled on production servers.
; Default Value: Off
; Development Value: On
; Production Value: Off
;
track_errors = On

; Turn off normal error reporting and emit XML-RPC error XML
;
;xmlrpc_errors = 0

; An XML-RPC faultCode
;xmlrpc_error_number = 0

; When PHP displays or logs an error, it has the capability of formatting the
; error message as HTML for easier reading. This directive controls whether
; the error message is formatted as HTML or not.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: On
; Development Value: On
; Production value: On
;
html_errors = On

; If html_errors is set to On *and* docref_root is not empty, then PHP
; produces clickable error messages that direct to a page describing the error
; or function causing the error in detail.
; You can download a copy of the PHP manual from
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot. PHP's default behavior is to leave these settings empty, in which
; case no links to documentation are generated.
; Note: Never use this feature for production boxes.
;
; Examples
;docref_root = "/phpmanual/"

;
;docref_ext = .html

; String to output before an error message. PHP's default behavior is to leave
; this setting blank.
;
; Example:
;error_prepend_string = "<span >"

; String to output after an error message. PHP's default behavior is to leave
; this setting blank.
;
; Example:
;error_append_string = "</span>"

; Log errors to specified file. PHP's default behavior is to leave this value
; empty.
;
; Example:
;error_log = php_errors.log
; Log errors to syslog (Event Log on NT, not valid in Windows 95).
;error_log = syslog

;windows.show_crt_warning
; Default value: 0
; Development value: 0
; Production value: 0

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;

; The separator used in PHP generated URLs to separate arguments.
; PHP's default setting is "&".
;
; Example:
;arg_separator.output = "&"

; List of separator(s) used by PHP to parse input URLs into variables.
; PHP's default setting is "&".
; NOTE: Every character in this directive is considered as separator!
;
; Example:
;arg_separator.input = ";&"

; This directive determines which super global arrays are registered when PHP
; starts up. G,P,C,E & S are abbreviations for the following respective super
; globals: GET, POST, COOKIE, ENV and SERVER. There is a performance penalty
; paid for the registration of these arrays and because ENV is not as commonly
; used as the others, ENV is not recommended on productions servers. You
; can still get access to the environment variables through getenv() should you
; need to.
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS";
;
variables_order = "GPCS"

; This directive determines which super global data (G,P,C,E & S) should
; be registered into the super global array REQUEST. If so, it also determines
; the order in which that data is registered. The values for this directive are
; specified in the same manner as the variables_order directive, EXCEPT one.
; Leaving this value empty will cause PHP to use the value set in the
; variables_order directive. It does not mean it will leave the super globals
; array REQUEST empty.
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
;
request_order = "GP"

; This directive determines whether PHP registers $argv & $argc each time it
; runs. $argv contains an array of all the arguments passed to PHP when a script
; is invoked. $argc contains an integer representing the number of arguments
; that were passed when the script was invoked. These arrays are extremely
; useful when running scripts from the command line. When this directive is
; enabled, registering these variables consumes CPU cycles and memory each time
; a script is executed. For performance reasons, this feature should be disabled
; on production servers.
; Note: This directive is hardcoded to On for the CLI SAPI
; Default Value: On
; Development Value: Off
; Production Value: Off
;
register_argc_argv = Off

; When enabled, the ENV, REQUEST and SERVER variables are created when they're
; first used (Just In Time) instead of when the script starts. If these
; variables are not used within a script, having this directive on will result
; in a performance gain. The PHP directive register_argc_argv must be disabled
; for this directive to have any affect.
;
auto_globals_jit = On

; Whether PHP will read the POST data.
; This option is enabled by default.
; Most likely, you won't want to disable this option globally. It causes $_POST
; and $_FILES to always be empty; the only way you will be able to read the
; POST data will be through the php://input stream wrapper. This can be useful
; to proxy requests or to process the POST data in a memory efficient fashion.
;
;enable_post_data_reading = Off

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
;
post_max_size = 8M

; Automatically add files before PHP document.
;
auto_prepend_file =

; Automatically add files after PHP document.
;
auto_append_file =

; By default, PHP will output a character encoding using
; the Content-type: header.  To disable sending of the charset, simply
; set it to be empty.
;
; PHP's built-in default is text/html
;
default_mimetype = "text/html"

; PHP's default character set is set to empty.
;
;default_charset = "UTF-8"

; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
; to disable this feature. If post reading is disabled through
; enable_post_data_reading, $HTTP_RAW_POST_DATA is *NOT* populated.
;
;always_populate_raw_post_data = On

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "path1;path2"
;include_path = ".;c:phpincludes"
;
; PHP's default setting for include_path is ".;/path/to/php/pear"
;

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
;
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.
;
user_dir =

; Directory in which the loadable extensions (modules) reside.
;
; extension_dir = "./"
; On windows:
; extension_dir = "ext"

; Whether or not to enable the dl() function.  The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
;
enable_dl = Off

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers.  Left undefined, PHP turns this on by default.  You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
;
;cgi.force_redirect = 1

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request. PHP's default behavior is to disable this feature.
;cgi.nph = 1

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution.  Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.
;
;cgi.redirect_status_env =

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
;
;cgi.fix_pathinfo=1

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
; security tokens of the calling client.  This allows IIS to define the
; security context that the request runs under.  mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS.  Default is zero.
;
;fastcgi.impersonate = 1

; Disable logging through FastCGI connection. PHP's default behavior is to enable
; this feature.
;fastcgi.logging = 0

; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send
; RFC2616 compliant header.
; Default is zero.
;
;cgi.rfc2616_headers = 0

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
;
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;
;upload_tmp_dir =

; Maximum allowed size for uploaded files.
;
upload_max_filesize = 2M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
;
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
;
allow_url_include = Off

; Define the anonymous ftp password (your email address). PHP's default setting
; for this is empty.
;
;from="john@doe.com"

; Define the User-Agent string. PHP's default setting for this is empty.
;
;user_agent="PHP"

; Default timeout for socket based streams (seconds)
;
default_socket_timeout = 60

; If your scripts have to deal with files from Macintosh systems,
; or you are running on a Mac and need to deal with files from
; unix or win32 systems, setting this flag will cause PHP to
; automatically detect the EOL character in those files so that
; fgets() and file() will work regardless of the source of the file.
;
;auto_detect_line_endings = Off

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automat


本文由pc28.am发布于pc28.am,转载请注明出处:HTTP最新官方配置,配置文件中文版

上一篇:哪些说性格很顽强在艰难险阻或巨大压力面前不 下一篇:没有了
猜你喜欢
热门排行
精彩图文