Mod access » History » Revision 20
Revision 19 (zkv, 2012-08-11 10:42) → Revision 20/28 (gstrauss, 2016-07-13 05:26)
h1. Module mod_access {{>toc}} h2. Description The access module is used to deny access to files. h2. Options *url.access-allow* Allow access only to files with any of given trailing path names. Default value:empty *url.access-deny* Denies access to all files with any of given trailing path names. Default value:empty *access.deny-all* Denies access to all files. *Note*: access.deny-all should be used with a conditional to limit it (only from lighty 1.5x) h2. Usage examples *url.access-allow* <pre> url.access-allow = ( ".jpg", ".gif") </pre> You might want to deny access to all files ending with a tilde (~) or .inc because of: # Text editors often use a trailing tilde for backup files. # And the .inc extension is often used for include files with code. *url.access-deny* <pre> url.access-deny = ( "~", ".inc") </pre> *access.deny-all usage* <pre> $PHYSICAL["path"] =~ "(~|\.inc)$" { access.deny-all = "enable" } </pre> *Directory deny access* <pre> $PHYSICAL["path"] !~ "^/srv/example.org/" { access.deny-all = "enable" } </pre> *Directory deny access (1.4x versions)* <pre> $HTTP["url"] =~ "^/libraries" { url.access-deny = ("") } </pre>