我正在尝试加载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>
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/
答案 0 :(得分:2)
(在评论或编辑中回答的问题。请参阅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
。