A block directive specifies conditions under which the directive will take effect. Thus, block directives aren't scope based, but rather depend on whether the HTTP Server will take its directives into account when starting up, based on some condition holding true or false. You can use block directives to limit directives to work only on certain virtual hosts, directories, or files. There are two block directives: <IfModule> and <IfDefine>. <IfModule> You use the <IfModule> directive to mark those directives that are processed only if a certain module is present and is available in the OHS server. The stated module can be made available to OHS in either of two ways. It can be statically compiled into the OHS server, or you must make the module dynamically available by compiling the module and placing a LoadModule line in the httpd.conf file. The LoadModule line must appear before the <IfModule> directive. Here’s an example using the <IfModule> directive that comes into effect only for the mod_user_dir.c module: <IfModule mod_userdir.c> Any URL whose path starts with a tilde would be mapped to UserDir, provided the mod_userdir.c module exists. Otherwise, the <IfModule> directive has no effect. <IfDefine> As you're probably aware, in the Apache HyperText Transfer Protocol (HTTP) server program, the httpd daemon, when run as a standalone process, creates child processes or threads to handle user service requests. You normally don't invoke the httpd daemon directly, but rather do so through using the apachectl utility on Apache systems, and the opmnctl utility in Oracle HTTP Server. The directives within an <IfDefine> section are processed only if the enclosed test is evaluated to be true; otherwise, everything between the two <IfDefine ClosedForNow> By using the parameter-name specification, you can reverse the test and process directives within the <IfDefine> sections if the parameter name isn't Note that containers can't include other containers, with the exception of the Limit directive and the Files container. You can include a Files container in a
blog comments powered by Disqus |