httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Wilson <>
Subject [users@httpd] CGI problem with mod_userdir
Date Wed, 29 Jan 2003 21:41:10 GMT

I'm using httpd-2.0.40-11 I'm using mod_userdir to configure user 
public_html directories. The problem I'm running into is trying to allow 
the execution of CGI scripts in those directories. A VERY simple script 
which works in the normal web root does not work in the user's directory 
even though I have ExecCGI enabled for both. All I get in my server logs 
is "Premature end of script headers" which usually implies an error 
running the script. However, I know the script works because I can move 
it elsewhere and it executes fine.

Here's a sample from my httpd.conf:
<Location />
     Options ExecCGI

UserDir public_html
<Directory /home/*/public_html>
     Options ExecCGI

I can change my <Location> tags to <Directory> tags and vice-versa 
(changing the paths too) and the results are the same... it works for 
"/" but not "/home/*/public_html".

Here's my CGI script:

print "Content-type: text/html\r\n\r\n";
print "Script testing!";

And here's the error from my error log when it fails:
[Wed Jan 29 14:17:32 2003] [error] [client] Premature end 
of script headers: test.cgi

I've checked permissions, execute bit, etc. and it all seems to be set 
okay. It's just a matter of the file being in /home/*/public_html (and 
served through mod_userdir) vs. /var/www/blahblah. Is this a mod_userdir 
issue? Any help would be appreciated.


Shawn Wilson []
Software Developer,
PH: 877-327-0873, FAX: 406-294-5806

View raw message