I have LAMP installed on Ubuntu 14.04.1.
I want to be able to run cgi scripts from all directories that are within my website. So I added this to /etc/apache2/apache.conf
<Directory /var/www/>
AddHandler cgi-script .cgi .pl
Options FollowSymLinks +ExecCGI
</Directory>
I also did this edit in /etc/apache2/mods-enabled/mime.conf
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler cgi-script .cgi .py .pl
But now when i visit my script it says
You don't have permission to access /hello.pl on this server.
But I have chmodded and chowned the script.. in fact look...
ls -la hello.cgi
-rwxrwxrwx 1 www-data www-data 84 Jan 26 03:19 hello.pl