Apache Directive Index | Search for a title, author or keyword | ||||||||
Apache Directive Index Each Apache directive available in the standard Apache distribution is listed here. Apache is configured by placing directives in plain text configuration files. The main configuration file is usually called httpd.conf. Changes to the main configuration files are only recognized by Apache when it is started or restarted. Apache configuration files contain one directive per line. Directives placed in the main configuration files apply to the entire server. If you wish to change the configuration for only a part of the server, you can scope your directives by placing them in Directory, DirectoryMatch, Files, FilesMatch, Location, and LocationMatch sections. These sections limit the application of the directives which they enclose to particular filesystem locations or URLs. Apache allows for decentralized management of configuration via special files placed inside the web tree. The special files are usually called .htaccess. Directives placed in .htaccess files apply to the directory where you place the file, and all sub-directories. The .htaccess files follow the same syntax as the main configuration files. Since .htaccess files are read on every request, changes made in these files take immediate effect. To find which directives can be placed in .htaccess files, check the Context of the directive. The server administrator further controls what directives may be placed in .htaccess files by configuring the AllowOverride directive in the main configuration files. In general, you should never use .htaccess files unless you don't have access to the main server configuration file ( you do not have root access on the server system, as in the case of web hosting ). There are two main reasons to avoid the use of .htaccess files. The first of these is performance. When AllowOverride is set to allow the use of .htaccess files, Apache will look in every directory for .htaccess files. Thus, permitting .htaccess files causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested. The second consideration is one of security. You are permitting users to modify server configuration, which may result in changes over which you have no control. Carefully consider whether you want to give your users this privilege.
|
|||||||||
Apache Directive Index | Disclaimer: this link points to content provided by other sites. |