I am running on Debian 9 strech, hello.cgi

on command line

perl -cTw hello.cgi 

all is fine

When i try to navigate to the subdirectory I get an error 403.

I add some lines to apache2.conf to execute CGI to a special directory.

<Directory "/var/www/special-directory/">
    Options +ExecCGI
    AddHandler cgi-script .cgi

I put permission to hello.cgi

chmod 755 hello.cgi

I don't know why?

  • Have you tried chown username:usergroup -R /var/www/ – Simon Hayter Jun 15 '19 at 15:24
  • yes i try. There is a index.html in the same directory and it works. – Ornot Jun 16 '19 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.