简体   繁体   English

无法从 index.html 重定向到 Perl 脚本

[英]Unable to redirect from index.html to a Perl script

My web server directories are:我的 web 服务器目录是:

/var/www/cgi-bin /var/www/cgi-bin
/var/www/example.com/public_html /var/www/example.com/public_html

In my sites-enabled conf file I have:在我启用站点的 conf 文件中,我有:

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
 <Directory "/var/www/cgi-bin/">
     Options +ExecCGI
     AddHandler cgi-script .cgi
 </Directory>

In my index.html redirect to the index.pl file with:在我的 index.html 中重定向到 index.pl 文件:

<meta http-equiv="refresh" content="0; URL='http://example.com/cgi-bin/uploadstart.pl'">

The files permissions are:文件权限为:

-rwxr-xr-x 1 umast   www-data       749 Feb 10 22:34 uploadstart.pl

I can run the script via command line directly within the cgi-bin directory.我可以直接在 cgi-bin 目录中通过命令行运行脚本。

Yet from my browser I still get:然而,从我的浏览器我仍然得到:

Forbidden You don't have permission to access this resource. Forbidden 您无权访问此资源。

Apache/2.4.29 (Ubuntu) Server at warptv.com Port 80 Apache/2.4.29 (Ubuntu) 服务器在 warptv.com 端口 80

Looking at example.com-error.log I see:查看 example.com-error.log 我看到:

AH01630: client denied by server configuration AH01630:客户端被服务器配置拒绝

I know I am missing something.我知道我错过了什么。 It's been a while, but I was even sure that the group and owner could both be umast.已经有一段时间了,但我什至确定该组和所有者都可以是 umast。

What am I missing?我错过了什么?

Adding:添加:

<Directory /var/www/cgi-bin">
Require all granted
</Directory>

will make Apache serve files inside that directory.将使 Apache 提供该目录中的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM