Serving CGIs from public_html
In a long tradition of asking off-topic questions here, I beg your
forgiveness for the following:
I am running Debian/unstable an I installed Apache and mod-perl today.
Apache is version 1.3.14-2 mod-perl is 1.24.01-2.
My problem is that I can't serve CGIs from the public_html within my
home directory. I always get a
'Premature end of script headers:/home/juergen/public_html/index.pl'.
If I copy the script to /usr/lib/cgi-bin I can call it OK, so it's
probably not a problem with the script itself.
The script looks like this:
-------SNIP-------
#!/usr/bin/perl -w
use CGI qw(:standard);
print header,start_html("hello"),h1("Hello, World!"),end_html,"\n\n";
-------SNIP-------
I uncommented the following line in /etc/apache/httpd.conf:
AddHandler cgi-script .cgi .sh .pl
and the options for the home directories look like this:
-------SNIP-------
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes FollowSymLinks ExecCGI
</Directory>
-------SNIP-------
The permissions for ~/public_html are 'drwxr-xr-x' and the permissions
for the script itself are '-rwxr-xr-x'.
Static HTML pages work OK from ~/public_html.
Does anyone know what I have to do to be able to serve the script from
~/public_html?
TIA,
j
Reply to: