简体   繁体   中英

Unable to redirect from index.html to a Perl script

My web server directories are:

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

In my sites-enabled conf file I have:

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:

<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.

Yet from my browser I still get:

Forbidden You don't have permission to access this resource.

Apache/2.4.29 (Ubuntu) Server at warptv.com Port 80

Looking at example.com-error.log I see:

AH01630: client denied by server configuration

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.

What am I missing?

Adding:

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

will make Apache serve files inside that directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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