-   Linux - Software (
-   -   no access to cgi-bin within Apache (

Mackeral 05-13-2002 02:50 AM

no access to cgi-bin within Apache
Morning, can somebody help me with this problem, I've got Mandrake 8.2 running on my system with Apache setup and running quite happily, the only stumbling block is that Apache does not have access to the cgi-bin which is where I'm wanting to throw my perl scripts.

I've checked ownership/group of the cgi-bin, it was originally root and I've changed it to apache and still no luck.

Speedy help would be appreciated 'cos I can't get any further with my HNC web design assignment and it's got to be finished real soon.

Thanks in advance


j-ray 05-13-2002 03:00 AM

have you uncommented the add handler for cgi execution in the /etc/httpd/httpd.conf? if not do that. script alias should be set correct by default or did you change the directory of the cgi-bin? cheers

j-ray 05-13-2002 03:03 AM

(forgot that) try to set chmod 0777 to cgi-bin or 0755

Mackeral 05-13-2002 12:29 PM

I've set cgi-bin to 0777 and still no joy, I still get the message:
You don't have permission to access /cgi-bin/ on this server.

Not sure where the 'add handler' is in the httpd.conf file, and not sure what try try next really, any more suggestions??

The html directory and pages work ok but as soon as the page call to go to perl script from the cgi-bin I just get the above message.



j-ray 05-13-2002 01:58 PM

in my conf (/usr/local/apache/etc/hhtpd.conf) it is in line 831. that should look like:
AddHandler cgi-script cgi pl plx
it's important that the script ( is executable (chmod 0755 or 0777)
i'm not sure whether or not i forget sth important, but try that, if it doesn't work i'll have a closerl look at it again
cheers jens

j-ray 05-13-2002 02:09 PM

that's the trick:
<Directory "/home/jens/webs/perl/cgi-bin">
Options +ExecCGI
put that to the httpd.conf, name the directory correct, that should work if you have the cgi-bin in your home directory

j-ray 05-14-2002 05:15 AM

to make it clearer:
go to the section `script alias' in httpd.conf. there you might find a line
Options none
replace the 'none' with '+ExecCGI'
i`m sorry i guess i made it more complicated than necessary yesterday
good luck

All times are GMT -5. The time now is 06:23 PM.