LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   CGI In UserDirs (https://www.linuxquestions.org/questions/linux-general-1/cgi-in-userdirs-318571/)

Xyem 04-29-2005 07:40 PM

CGI In UserDirs
 
I have successfully managed to get UserDirs to work in Apache, however, CGI scripts don't work in the CGI-BIN of the UserDir.

I tested the CGI script in the Aliased directory (set in httpd.conf) where it worked fine (after chmod'ing it :) ) but when I copied it and chmod'ed it in a UserDir, it just returns 'Premature end of script headers'.

The only two possible reasons I can think of are that the CGI script is being chroot'ed and can't access the Interpreter or my httpd.conf is misconfigured. I have included the relevant (as far as I am aware) sections from my httpd.conf. Any help is greatly appreciated.

-------------
httpd.conf
-------------

AddHandler cgi-script .cgi

# Allows per user CGI
<Directory /home/*/www/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>

bluej 05-08-2005 09:05 AM

There is a third possible reason:

If apache is running suEXEC enabled and
the UID or GID of your script
or
the UID or GID of the directory of the script
don't match your user's UID or GID.


All times are GMT -5. The time now is 02:55 AM.