码迷,mamicode.com
首页 > Web开发 > 详细

apache2.4 httpd.conf httpd-vhost.conf配置

时间:2018-07-24 17:38:37      阅读:351      评论:0      收藏:0      [点我收藏+]

标签:extra   mpm   html   ror   rect   .com   dir   code   signature   

extra / httpd-vhost.conf

<VirtualHost *:81>
    DocumentRoot "/data/sda1_data/"
    ServerName nemtech.cn
    ServerAlias nemtech.cn
    ServerSignature Off
  
    ErrorLog "logs/nemtech.cn-error_log"
    CustomLog "logs/nemtech.cn-access_log" common

  <Directory /data/sda1_data/>
        Options Indexes
        IndexOptions Charset=UTF-8
        ReadmeName  /footer.html
        IndexIgnore footer.html bk.jpg alipay.jpg wechatpay.jpg 
        Order deny,allow
        Allow  from all

        AllowOverride AuthConfig 
        AuthName "Personal web Auth!" 
        AuthType Basic
        AuthUserFile /data/.htpasswd 
        require valid-user 
      
        SetEnvIfNoCase Referer "nemtech.cn" local_ref
        SetEnvIfNoCase Referer "^$" local_ref 
        <filesmatch "\.(txt|doc|mp3|zip|rar|jpg|gif)">
            Order Allow,Deny
            Allow from env=local_ref
        </filesmatch>

        
</Directory>

</VirtualHost>

httpd.conf

```
技术分享图片

技术分享图片

技术分享图片

httpd-mpm.conf 为apache连接数配置

apache2.4 httpd.conf httpd-vhost.conf配置

标签:extra   mpm   html   ror   rect   .com   dir   code   signature   

原文地址:https://www.cnblogs.com/zhaocundang/p/9360423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!