如何解决是什么导致此错误proxy_fcgi:error] AH01071:得到错误“主脚本未知”
我收到proxy_fcgi:错误] AH01071:经常出现错误“主脚本未知”错误。谁能告诉我导致此错误的原因。到目前为止,我了解到的是重写规则可能会导致此问题。但是不完全了解导致此问题的原因。以下是我的重写规则:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Require all granted
# Setting rewrite rules
RewriteEngine on
RewriteBase /
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
# Show 404 error if there is any slash after page name
RewriteRule ^.+?\.(php|html?)/ - [L,R=404,NC]
# Custom Directory Index Files
DirectoryIndex index.php index.html
</Directory>
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory /var/www/>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride None
Require all granted
# Setting rewrite rules
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
# Show 404 error if there is any slash after page name
RewriteRule ^.+?\.(php|html?)/ - [L,NC]
# Custom Directory Index Files
DirectoryIndex index.php index.html
</Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
</VirtualHost>
</IfModule>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。