【发布时间】:2023-03-25 05:08:01
【问题描述】:
当我将<VirtualHost> 指令添加到下面的.htaccess 文件时,我们的生产服务器news.XXX(我写XXX 而不是我们的真实域名)失败并出现内部错误。
请帮助了解错误原因。
Header set X-UA-Compatible "IE=edge"
AddType text/html .html
AddType text/x-component .htc
AddHandler server-parsed .html .xml
Options -Indexes +Includes +ExecCGI
Order allow,deny
Allow from all
#<FilesMatch "\.(xml|css|js)$">
# ExpiresActive on
# ExpiresDefault "access plus 15 minutes"
#</FilesMatch>
#<IfModule mod_expires.c>
# ExpiresActive on
# ExpiresDefault "access"
# ExpiresDefault "access plus 15 minutes"
# ExpiresByType text/html "access"
# ExpiresByType text/plain "access"
# ExpiresByType text/csv "access"
# ExpiresByType application/xml "access"
#</IfModule>
RewriteEngine On
#DirectoryIndex /working-on-server.html
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ /working-on-server.html [L]
# Replaced real domain with XXX
<VirtualHost victor11.XXX>
DirectoryIndex /cgi-bin/news/index.NEW.fcgi
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cgi-bin/news/index.NEW.fcgi [L,QSA]
</VirtualHost>
DirectoryIndex /cgi-bin/news/index.fcgi
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /cgi-bin/news/index.fcgi [L,QSA]
【问题讨论】:
标签: apache .htaccess internal-server-error