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 .cgiYou may want to add a Type for perl scripts:
AddType application/x-httpd-cgi .pl2. Add an ExecCGI option to the Options for your Root Document declaration in the access.conf or httpd.conf file:
Options Indexes FollowSymLinks ExecCGIHow 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 .plTo enable server side includes, add something like this:
AddType text/x-server-parsed-html .htmlWhere 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
LOFTHOUSE PUBLISHING |
![]() |
Questions or Comments?