1,apache禁用文件列表
<Directory "F:/wwwroot/">
#
# 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.2/mod/core.html#options
# 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 all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
</Directory>
2,apache添加多个主机
1)在httpd.conf中取消Include conf/extra/httpd-vhosts.conf对此行的备注,以使虚拟主机的配置文件能被读取;
2)在httpd.conf中添加NameVirtualHost 127.0.0.1:80,否则所有域名都将定义的第一个虚拟主机;
3)在httpd_vhosts.conf中定义虚拟主机:
<VirtualHost 127.0.0.1:80>
ServerAdmin @qq.com
DocumentRoot F:\aaa.org.cn\wwwroot
ServerName www.aaa.org.cn
ServerAlias aaa.org.cn
ErrorLog F:\aaa.org.cn\log\error_log
TransferLog F:\aaa.org.cn\log\access_log
</VirtualHost>
<VirtualHost 127.0.0.1:80>
ServerAdmin @qq.com
DocumentRoot F:\bbb.ac.cn\wwwroot
ServerName www.bbb.ac.cn
ServerAlias bbb.ac.cn
ErrorLog F:\bbbac.cn\log\error_log
TransferLog F:\bbb.ac.cn\log\access_log
</VirtualHost>
3,查看apache的mpm模式
apache2 -V
Server version: Apache/2.2.22 (Ubuntu)
Server built: Mar 8 2013 15:53:13
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.6, APR-Util 1.3.12
Compiled using: APR 1.4.6, APR-Util 1.3.12
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
关于MPH_Prework的介绍详见: