Practical mod_perl / HTML Book / books


previous page: 4.1.3.3. <Location URI> ... </Location>page up: HTML Version of the booknext page: 4.1.5. Subgrouping of <Directory>, <Location>, and <Files> Sections

4.1.4. Merging <Directory>, <Location>, and <Files> Sections


Search







modperlbook.org


 HTML Book


 PDF Book


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.



When configuring the server, it's important to understand the order in which the rules of each section are applied to requests. The order of merging is:

  1. <Directory> (except for regular expressions) and .htaccess are processed simultaneously, with the directives in .htaccess overriding <Directory>.

  2. <DirectoryMatch> and <Directory ~ > with regular expressions are processed next.

  3. <Files> and <FilesMatch> are processed simultaneously.

  4. <Location> and <LocationMatch> are processed simultaneously.

Apart from <Directory>, each group is processed in the order in which it appears in the configuration files. <Directory>s (group 1 above) are processed in order from the shortest directory component to the longest (e.g., first / and only then /home/www). If multiple <Directory>sections apply to the same directory, they are processed in the configuration file order.

Sections inside <VirtualHost>sections are applied as if you were running several independent servers. The directives inside one <VirtualHost>section do not interact with directives in other <VirtualHost>sections. They are applied only after processing any sections outside the virtual host definition. This allows virtual host configurations to override the main server configuration.

If there is a conflict, sections found later in the configuration file override those that come earlier.

 

Continue to:

  • prev: 4.1.3.3. <Location URI> ... </Location>
  • Table of Contents
  • next: 4.1.5. Subgrouping of <Directory>, <Location>, and <Files> Sections

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 4.1.3.3. &lt;Location URI&gt; ... &lt;/Location&gt;page up: HTML Version of the booknext page: 4.1.5. Subgrouping of &lt;Directory&gt;, &lt;Location&gt;, and &lt;Files&gt; Sections

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Tue Feb 24 12:54:53 2009