Click to See Complete Forum and Search --> : Execution of cgi scripts in public_html


OliverW
07-11-2002, 10:52 AM
Hey everybody,

I'm trying to setup my apache so that cgi scripts can be executed from public_html(/cgi-bin) dirs from a users home dir.

I've looked into the cgiwrap solution, but I don't like it (yes yes, I know about the advantages, but I choose not to use it) for this box.

Now what is the best way to get it actually working? I've seen 'suexec' in a couple of things I found on google, but somehow I don't have it on my debian box after installing apache.

Can anybody gimme a hint or 2 to help me out here?

ntt.
07-11-2002, 07:02 PM
You can override options in the httpd.conf file using a .htaccess file in the directory, so putting one of these files in the right directories should do the trick.

You'll have to have the line 'Options ExecCGI' in the file, if unsure, I found a good looking web page (http://www.evolt.org/article/A_Cheesy_htaccess_Tutorial/18/226/) that explains it a bit.

OliverW
07-13-2002, 12:33 PM
Thank you for your reply, I haven't followed your advice though, but I found a different solution to enable cgi scripts in the public_html/cgi-bin dir.. this might come in handy for other people as well :D

Simply put this in your httpd.conf


# Standard configuration for cgi-bin:

<Directory /usr/lib/cgi-bin/>
(or whatever dir you are using for the cgi-bin)
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

# Additional settings to get cgi scripts to work in public_html/cgi-bin

<Directory "/home/*/public_html/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>


This will do the trick!