问题描述
我收到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 (将#修改为@)