Home   Web Hosting   Support   Contents   Search

How to Use CGI in any directory

FAQ   Standard  Deluxe    Mammoth   Policies

How do I use CGI in any directory?

First, we recommend that you familiarize yourself with the configuration files for your web server.

To allow CGI's to be executed from any directory do the following:

1. Uncomment the following "AddType" directive in the srm.conf or httpd.conf file:

AddType application/x-httpd-cgi .cgi 

You may want to add a Type for perl scripts:

AddType application/x-httpd-cgi .pl 

2. Add an ExecCGI option to the Options for your Root Document declaration in the access.conf or httpd.conf file:

Options Indexes FollowSymLinks ExecCGI 

How do I use CGI in only certain directories?

Add the following lines to the .htaccess file of that directory.

Options Indexes FollowSymLinks ExecCGI
AddType application/x-httpd-cgi .cgi
AddType application/x-httpd-cgi .pl

To enable server side includes, add something like this:

AddType text/x-server-parsed-html .html

Where can I learn more about CGI's?

The best place to learn about cgi's is on the web:

General Reference
http://hoohoo.ncsa.uiuc.edu/cgi/

Manual for the Server Operating system
http://www.bsdi.com/bsdi-man

 

FAQ   Standard  Deluxe    Mammoth   Policies

Credit Cards Accepted Here!
e-commerce enabled courtesy of CyberCash

LOFTHOUSE PUBLISHING
97 South Main Suite #254
Brigham City, Utah
For more information please contact: Sales@Lofthouse.com

Web hosting and software development at Lofthouse Publishing

Questions or Comments?

E-mail:
Name:
Comments: