[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setting up Apache for CGI



John Reinke wrote:
> 
> Perhaps this is slightly off-topic, but this might still come under the
> "newbie" category.
> 
> I am trying to get Apache to allow CGI scripts from user cgi-bin
> directories. I've looked at the Web HOWTO, and at apache.org for help, but
> perhaps my question is too easy.
> 
> Basically, I'm trying to get it set up so users have a .public_html
> directory in their home directory, and cgi-bin within that. I think I have
> that set up correctly, because if I don't name a CGI *.cgi, it will output
> the cgi script source in the browser. 

This can be changed by adding
AddHandler cgi-script .pl

to /etc/apache/srm.conf .. add any additional extensions you want to it
and restart apache.


>Otherwise, the error (500) I always
> get is:
> 
> The server encountered an internal error or misconfiguration and was unable
> to complete your request.
> 
> The logs say "Premature end of script headers", but I'm positive the script
> is correctly formatted , since I've used it in other places. It has the two
> newlines following the content-type. I've tried both a perl script and a
> shell script. Any suggestions?

try running the script at the command line see what happens, thats
usually a good way to diagnose things. also what script is it ? can you
post it somewhere so i can take a look at it. Also if you have suexec
turned on in apache(for debian looks like default is off) you can turn
it off to see if that helps, i had major probs with suexec in the past.

nate

-- 
:::
ICQ: 75132336
http://www.aphroland.org/
http://www.linuxpowered.net/
aphro@aphroland.org



Reply to: