【问题标题】:cgi-bin 403 forbidden on apache2cgi-bin 403 在 apache2 上被禁止
【发布时间】:2012-07-30 16:03:07
【问题描述】:

我正在尝试加载 cgi-bin,但我不断收到 403 权限错误。 当我尝试加载 cgi-bin/index.pl 时,找不到 404 页面。 项目权限使用 chmod -R 755 设置。

服务器正在使用 php5-cgi 运行 debian Squeeze,apache2。

这是 /etc/apache2/sites-enabled/000-default:

DocumentRoot /var/www/
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options +Indexes FollowSymLinks MultiViews
            AllowOverride None
            Order allow,deny
            allow from all
    </Directory>

    Alias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

错误日志:

[Mon Jul 30 09:39:30 2012] [notice] Apache/2.2.16 (Debian) PHP/5.3.3-7+squeeze13 with Suhosin-Patch configured -- resuming normal operations
[Mon Jul 30 09:50:44 2012] [error] Directory index forbidden by Options directive: /usr/lib/cgi-bin/

【问题讨论】:

    标签: indexing cgi-bin


    【解决方案1】:

    (问题已在 cmets 或编辑中回答。见 Question with no answers, but issue solved in the comments (or extended in chat)

    OP 写道:

    已解决:将 000-default 的底部更改为:

    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    <Directory "/var/www/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>
    

    然后安装了一些缺少的 perl 模块并且它工作了。能够打开浏览器到/localhost/cgi-bin/index.pl

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-16
      • 1970-01-01
      • 1970-01-01
      • 2016-02-12
      • 2014-02-03
      • 2020-05-07
      • 2020-01-31
      • 1970-01-01
      相关资源
      最近更新 更多