2012-07-30 60 views
2

我試圖加載cgi-bin,並且一直收到403權限錯誤。 當我試圖加載cgi-bin/index.pl時,我找不到404頁面。 使用chmod -R 755設置項目權限。cgi-bin 403在apache2上禁止

服務器使用php5-cgi運行debian squeeze,apache2。

這是在/ etc/apache2的/網站啓用/ 000默認:

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> 

error.log中:

[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/ 

回答

2

(提問回答的評論或編輯請參見Question with no answers, but issue solved in the comments (or extended in chat)

的OP寫道:

解決:改變000,默認的底部部分:

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