我正在尝试使用以下 .htaccess 值托管基于 php 的应用程序.
I'm trying to host a php based application with the following .htaccess values.
Options +FollowSymLinks Options -Indexes DirectoryIndex index.php RewriteEngine On RewriteBase /easydeposit RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]然而,我一直面临以下两个错误,
However, I keep facing the following two errors,
[access_compat:error] [pid 25330:tid 27] AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/system/ [access_compat:error] [pid 25330:tid 27] AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/private/ [access_compat:error] [pid 25330:tid 27] AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/application/ [authz_core:error] [pid 25330:tid 27] AH01630: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/.htaccess我不确定为什么会发生这种情况.任何帮助表示赞赏.
I'm not sure why this is happening. Any help is appreciated.
推荐答案如果您最近升级到高于 2.2 的 Apache 版本,则 authz_core 错误错误可能来自您的 httpd.conf 或 httpd-vhosts.conf 标签中的文件.mod_authz_core 是在 Apache 2.3 中引入的,它改变了声明访问控制的方式.
If you have recently upgraded to a version of Apache greater than version 2.2, the authz_core error error might be coming from your httpd.conf or httpd-vhosts.conf file in the <Document> tags. mod_authz_core was introduced in Apache 2.3 and changed the way that access control is declared.
所以,例如,代替2.2的配置...
So, for example, instead of the 2.2 way of configuring <Directory>...
<Directory "C:/wamp"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>Order 和 Allow 指令已替换为 Require 指令:
Order and Allow directives have been replaced with the Require directive:
<Directory "C:/wamp"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>来源www.andrejfarkas/2012/06/fun-with-wamp-server-and-apache-2-4-2/httpd.apache/docs/2.4/upgrading.html
更多推荐
.htaccess 和 mod
发布评论