Linux - GeneralThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Does anyone know how to configure the apache config file httpd.conf to allow users to execute CGI programs. What I would like is to basically allow any CGI script that is contained in any cgi-bin directory to be allowed to execute, under an address like so:
I will try that out. The error I keep getting is to do with Premature end of script headers. I have checked the Apache docs, but none of the advice is particularly useful. I know that I cab run CGI perl scripts, because I am able to use the script alias thing, but I really need to run CGI in the home directorys.
I have the exact same problem. Did you ever find a solution, or does anyone have a solution for this? The script I am using is a very simple one that I use to test cgi permissions - runs on all my other boxes. Permissions set to 755
RH8, perl 5.x, apache 2.x
christ, I posted this on the wrong thread....I am attempting to run this script from the default /var/www/cgi-bin/ folder, not a user home directory...sorry
Last edited by huxtablejones; 12-08-2002 at 04:58 PM.
I'm not guaranteeing that this is your problem, but I found that suexec gave me fits similar to what you are describing. The easiest fix is to locate suexec, and move it to another directory, then restart apache. The reason is that (i think) suexec is compiled into the RPM with CGI running as the user has to be run from under the /var/www/cgi-bin directory. When you setup virtual servers that run from users home directories (i.e. /home/user/www/cgi-bin), seexec will not allow the script to run. You're supposed to be able to recompile suexec to use another directory, but I have never been brave enough to do it without specific directions from an advanced user. I do know that you can set Apache to run as user Apache and group Apache in the conf file, then remove suexec from the default path and Apache will run the scripts where you tell them to. I would just like to run Apache as the user instead of Apache.
Hope this helps somehow,
The problem you will find (that I previously encountered) is that when files are created by apache through the cgi, they will be owned by apache. If the user logs in via ftp, telnet, or ssh, they will not have the permissions needed to edit or delete them. By fixing suexec, apache will run as the user, and all files or directories created by cgi processes will be owned by that user. In some situations, the 755 and group change will work fine, in others, it won't.