</Directory>tags create a container used to enclose a group of configuration directives which apply only to a specific directory and its subdirectories. Any directive which is applicable to a directory may be used within
By default, very restrictive parameters are applied to the root directory (
/), using the
Options(refer to Section 10.5.23, “
AllowOverride(refer to Section 10.5.24, “
AllowOverride”) directives. Under this configuration, any directory on the system which needs more permissive settings has to be explicitly given those settings.
In the default configuration, another
Directorycontainer is configured for the
DocumentRootwhich assigns less rigid parameters to the directory tree so that the Apache HTTP Server can access the files residing there.
Directorycontainer can be also be used to configure additional
cgi-bindirectories for server-side applications outside of the directory specified in the
ScriptAliasdirective (refer to Section 10.5.41, “
ScriptAlias” for more information).
To accomplish this, the
Directorycontainer must set the
ExecCGIoption for that directory.
For example, if CGI scripts are located in
/home/my_cgi_directory, add the following
Directorycontainer to the
<Directory /home/my_cgi_directory> Options +ExecCGI </Directory>
AddHandlerdirective must be uncommented to identify files with the
.cgiextension as CGI scripts. Refer to Section 10.5.56, “
AddHandler” for instructions on setting
For this to work, permissions for CGI scripts, and the entire path to the scripts, must be set to 0755.