apache 2.2.15 伪静态配置失败处理

在阿里云上再搭建一个 Apache(版本是2.2.15 Unix和阿里云ECS版本一致),用于nginx反向代理

做伪静态处理一直不成功,后比较阿里云默认apache httpd.conf文件,发现如下问题:

主要是因为缺少以下这两个配置(估计是因为我装的版本问题没有):

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Allow from all
Satisfy All
</Files>

将默认的FilesMatch 节点去掉(具体见红色标注)

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

最终问题解决

posted @ 2017-09-23 23:56  输入啊  阅读(471)  评论(0编辑  收藏  举报