|
How do I execute CGI's from any directory?
"
How do I execute CGI's from any directory on my Virtual Server?
"
First, we recommend that you familiarize yourself with the
configuration files for your web server which is based on the Apache
web server software. An excellent on-line resource can be found at
www.apache.org.
To allow CGI's to be executed from any directory do the following:
-
Remove the comment character (the "#") from the appropriate
directive in the ~/www/conf/httpd.conf or srm.conf file as shown
below.
Note: Older versions of the web server configuration file (httpd.conf
or srm.conf) use "AddType", newer version of the configuration
file (usually just httpd.conf) use "AddHandler".
AddType application/x-httpd-cgi .cgi
or
AddHandler cgi-script .cgi
You may want to add a type/handler for perl scripts:
AddType application/x-httpd-cgi .pl
or
AddHandler cgi-script .pl
-
Add an ExecCGI option to the Options
for your Root Document declaration in the
~/www/conf/httpd.conf or access.conf file:
<Directory /usr/local/etc/httpd/htdocs>
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
Options Indexes FollowSymLinks ExecCGI
If you want to enable this for all virtual hosts in the
vhosts directory, you should modify the Options for:
<Directory /usr/local/etc/httpd/vhosts>
|