# 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 "D:/wamp/www">
#
# 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
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options None
#
# 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
5.禁止显示Apache版本设置,将ServerSignature On 改为 ServerSignature Off ServerTokens Prod 如下
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
ServerSignature Off ServerTokens Prod
6.禁止服务器报错信息
ErrorDocument500 "The server made a boo boo." 前# 去掉
7.对请求量进行限制(无则添加)
# Maximum size of the request body.
LimitRequestBody 64000
# Maximum number of request headers in a request. LimitRequestFields 32
# Maximum size of request header lines.
LimitRequestFieldSize 8000
# Maximum size of the request line.
LimitRequestLine 4000
8.对访问超时以及连接数进行限制(无则添加)
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 10
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
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.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
AcceptFilter http data
AcceptFilter https data
9.禁用Apache选项-Trace方法