有FollowSymLinks或SymLinksIfOwnerMatch已关闭FollowSymLinks、SymLinksIfOwnerMatch

2023-09-02 09:49:49 作者:逼大无脑@

我看过几乎所有可能的这个问题,但没有找到任何可以解决我的问题。 这是erorr登录我得到: 有FollowSymLinks或SymLinksIfOwnerMatch是关闭这意味着RewriteRule指令禁止:/var/www/vhosts/site.com/httpdocs/cgi-bin/cron.pl

I've read almost everything possible for this issue and couldn't find anything that would solve my problem. This is erorr log I'm getting: Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/vhosts/site.com/httpdocs/cgi-bin/cron.pl

当访问的网站,我得到403紫禁城您没有权限访问此文件。错误。

When accessing site I get 403 Forbidden "You do not have permission to access this document." error.

我修改我的.htaccess有这样的:

I've modified my .htaccess to have this:

Options +FollowSymLinks +SymLinksIfOwnerMatch
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
.
.
.

我还添加了这httpd.conf中:

I also added this to httpd.conf:

AddHandler cgi-script .cgi
AddHandler cgi-script .pl

<Directory />
Options -ExecCGI FollowSymLinks -Includes -IncludesNOEXEC -Indexes -MultiViews -SymLinksIfOwnerMatch
AllowOverride All
</Directory>

我真的有什么可以做?

Really what can I do next?

推荐答案

请注意这从的阿帕奇文档的选项:

通过A +或混合选项 - 与那些没有无效的语法,   并会在服务器启动时的语法检查与被拒绝   中止。

Mixing Options with a + or - with those without is not valid syntax, and will be rejected during server startup by the syntax check with an abort.

正在混音选项与+/-并没有在你的块(即见的FollowSymLinks)。

You are mixing options with +/- and without in your block (i.e. see FollowSymLinks).

我有同样的确切的错误今天展示了对我的一个网站,我忘了在选项前面加一个+。我增加了+,它现在的作品。

I had this same exact error showing up today on one of my sites where I had forgotten to add a "+" in front of an option. I added the "+" and it now works.

相关推荐