Apache and cgi 403 Error.
It should have been easy enough, but here I am.
I have perl and Apache installed, and my cgi-bin is in /srv/www/cgi-bin. Here I have put the usual Hello World type first ever cgi file Hello.cgi. Here, as root I did chmod ugo+rx Hello.cgi, so there shouldn't be any permissions problem. So far so good. In my httpd.conf I have put ScriptAlias /cgi-bin/ /srv/www/cgi-bin <Directory /srv/www/cgi-bin/> Options +ExecCGI </Directory> AddHandler cgi-script cgi AddHandler cgi-script pl And my html file contains a link <a href="http://localhost/Hello.cgi"> This is a CGI script </a> What I get is an Error 403, Access forbidden, You don't have permission to access this object etc. I guess that since the cgi script has the permissions that somethings wrong with the httpd.conf file, but I have been searching the web for the last four hours, and now I'm here. |
Try: <a href="http://localhost/cgi-bin/Hello.cgi"> This is a CGI script </a>
Also remove the "+" in front of ExecCGI |
Thanks
I had tried various things here, and I thought I had tried
the /localhost/cgi-bin, but obviously I hadn't. Thanks again, now its time to start debuggibg my perl script! |
All times are GMT -5. The time now is 02:23 PM. |