Where can the directive be set?

by rajesh 2007-06-08 07:21:27

Even before going deep in to directives it is essential to know the context for directives. i.e. each directive can be set at different levels what we call as context. There are four different levels where the directives can be used

a) Server Config or Configuration Files:
When a directives context is defined as server config, it indicates that the directive can be used only in the server configuration files (e.g., httpd.conf, srm.conf, and access.conf). Listen is one of the example directive which we have already seen. So using Listen Directive in any other context will not work as expected.

b) Directory:
Directory context indicates that the directive can be used inside the containers like <Directory>, <Location>, and <Files>. These containers are used to set directive or property for a specific directory or file.

c) .htaccess:
In the coming part we will see what htaccess is all about.

d) Virtual host
This context means that the directive may appear inside <VirtualHost> containers in the server configuration files.

Each container will be analyzed in detail in the following parts..

Tagged in:


You must LOGIN to add comments