Apache .htaccess Guide, Tutorials and Articles
Username:
Password:
Register / My Account / Forgotten Password?

Enable CGI outside of the cgi-bin

(Edit this article)
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:

AddHandler cgi-script .cgi
Options +ExecCGI

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.

<- Enable SSI with .htaccess Disable directory listings ->

Visitor Comments and Responses

Novice Article Rating: 10 out of 10
Added both lines to .htaccess worked.
Space Holder
Moderator Article Rating: 10 out of 10
Contact your system administrator for advice, using this may go against the server configuration or the options may be restricted for security reasons...
Space Holder
me Article Rating: 5 out of 10
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.
Space Holder
Average Rating: 7.76 out of 10 (25 Votes)

Submit Comment/Rating

Article Rating:
Name: (optional)
Your Comment/Response: (optional)
Powered by OpenCrypt Article Manager
Table of Contents RSS Feed
1. What is .htaccess?
2. How to use .htaccess
3. Error documents
4. Redirects
5. Password protection
6. Deny visitors by IP address
7. Deny visitors by referrer
8. Hot link prevention techniques
9. Blocking offline browsers and 'bad bots'
10. DirectoryIndex uses
11. Adding MIME types
12. Enable SSI with .htaccess
13. Enable CGI outside of the cgi-bin
14. Disable directory listings
15. Setting server timezone
16. Changing server signature
17. Useful Resources
Space Holder
Space Holder


Copyright © 1999 - 2008 ionix Limited. All Rights Reserved. Company Information, Affiliates

Powered by OpenCrypt Membership Software