LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-29-2005, 07:40 PM   #1
Xyem
Member
 
Registered: Apr 2005
Distribution: Fedora Core 4
Posts: 100

Rep: Reputation: 15
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>
 
Old 05-08-2005, 09:05 AM   #2
bluej
LQ Newbie
 
Registered: Mar 2004
Location: japan
Distribution: debian
Posts: 24

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl CGI:Can't locate CGI.pm supermyself Programming 13 09-10-2007 06:22 AM
Executing web based Perl programs in userdirs markham82 Linux - General 3 12-15-2004 07:49 PM
Running web based perl scripts in userdirs markham82 Linux - Networking 1 12-15-2004 06:51 AM
CGI to work out side of cgi-bin? crashedspine Linux - Newbie 13 09-02-2004 08:49 PM
http://www.burstnet.com/cgi-bin/ads/ad7954a.cgi/3980/RETURN-CODE rverlander LQ Suggestions & Feedback 1 06-07-2002 07:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration