我必须遵循问题。在我的Apache服务器上sudo a2enmode rewrite && service-apache restart
安装RewriteEngine后,我在尝试访问网站时收到403权限错误。错误日志显示为:
[Mon Aug 03 16:47:04.772033 2015] [authz_core:error] [pid 27107] [client ::1:41610] AH01630: client denied by server configuration: /home/lenxn/Venuzle/vvm/public/
访问日志:
::1 - - [03/Aug/2015:17:08:11 +0200] "GET / HTTP/1.1" 403 2267 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.8.0"
apache2.conf
不受安装的影响,我的源根目录中的.htaccess
如下所示:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
这是什么问题?我已经能够访问安装之前的服务器。是否已创建或替换任何文件,这会否决我之前的权限设置?
答案 0 :(得分:0)
我最后通过更改
部分修复了它<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
从apache2.conf
到
<Directory />
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory> .