Apache .htaccess Guide & Tutorial >>
Enable CGI outside of the cgi-bin
If your web server does not allow you to run CGI scripts outside of the 'cgi-bin' directory, you can enable CGI. Check with your system administrator or web hosting company before doing so.
To enable CGI, create a .htaccess file following the main instructions and guidance which includes the following text:
|
The above lines tell the Apache Web Server to allow firstly, process '.cgi' files as CGI scripts, and secondly to enable CGI within the directory.
Comments
|
Novice "Added both lines to .htaccess worked." |
|
Moderator "Contact your system administrator for advice, using this may go against the server configuration or the options may be restricted for security reasons..." |
|
me "I added that to an .htaccess file on my fedora core 3 server, and it would send me to the 404 error page for some reason. As soon as I cleared out the htaccess file, I was allowed to pull the page up in that directory." |


