【发布时间】:2026-01-11 06:00:02
【问题描述】:
我在 Azure 中有一个使用 Apache 托管的网站。我试图使用http://example.com/laravel/public 访问该网站,它显示“访问被拒绝”消息,当我检查错误日志消息时,它显示标题中所述的 proxy_fcgi:error AH01071 消息。我不确定是 htaccess 配置问题还是其他配置导致了这个问题。请帮忙。
在我的 .htaccess 中,我配置了以下内容:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
【问题讨论】: