APACHE配置相关记录

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的介绍详见:

http://lamp.linux.gov.cn/Apache/ApacheMenu/mod/prefork.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值