Section 13.3:Configuration Directives in httpd.conf
<Directory /home/my_cgi_directory>
Options +ExecCGI
</Directory>
To allow CGI script execution in /home/my_cgi_directory, you will need to take a few extra
steps besides setting ExecCGI. You will also need to have the AddHandler directive uncommented
to identify files with the .cgi extension as CGI scripts. See Section 13.3.65, AddHandler for
instructions on setting AddHandler. Permissions for CGI scripts, and the entire path to the scripts,
must be set to 0755.
13.3.30 Options
The Options directive controls which server features are available in a particular directory. For
example, under the restrictive parameters specified for the root directory, Options is set to only
FollowSymLinks. No features are enabled, except that the server is allowed to follow symbolic
links in the root directory.
By default, in your DocumentRoot directory, Options is set to include Indexes, Includes
and FollowSymLinks. Indexes permits the server to generate a directory listing for a directory
if no DirectoryIndex (for example, index.html) is specified. Includes means that server-
side includes are permitted. FollowSymLinks allows the server to follow symbolic links in that
directory.
You will also need to include Options statements for directories within virtual hosts directives, if
you want your virtual hosts to recognize those Options.
For example, server side includes are already enabled inside the /var/www/html directory, because
of the Options Includes line within the <Directory "/var/www/html"> directives sec-
tion. However, if you want a virtual host to recognize that server side includes are allowed within
/var/www/html, you will need to include a section like the following within your virtual host's
tags:
<Directory /var/www/html>
Options Includes
</Directory>
13.3.31 AllowOverride
The AllowOverride directive sets whether or not any Options can be overridden by the decla-
rations in an .htaccess file. By default, both the root directory and the DocumentRoot are set
to allow no .htaccess overrides.
201
Need help?
Do you have a question about the LINUX 7.2 and is the answer not in the manual?
Questions and answers