-1

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?

  • After many searches on line I added ' Require all granted' ` to the cgi section of the example.com.conf. While that worked, I want to make sure I didn't open something I shouldn't have – oldprogrammer84 Feb 11 '22 at 04:44

1 Answers1

0

Adding:

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

will make Apache serve files inside that directory.

Example person
  • 3,198
  • 3
  • 18
  • 45
  • See comment above my question, but thanks for letting me know that was the right move – oldprogrammer84 Feb 11 '22 at 06:37
  • No, please. Am glad you responded. I found that answer out of many tried. But I wasn't sure it was the **correct** answer. Fort all I knew I just opened up my entire server to the public. – oldprogrammer84 Feb 11 '22 at 06:52