Mod access » History » Revision 20
« Previous |
Revision 20/28
(diff)
| Next »
gstrauss, 2016-07-13 05:26
Module mod_access¶
- Table of contents
- Module mod_access
Description¶
The access module is used to deny access to files.
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)
Usage examples¶
url.access-allow
url.access-allow = ( ".jpg", ".gif")
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
url.access-deny = ( "~", ".inc")
access.deny-all usage
$PHYSICAL["path"] =~ "(~|\.inc)$" { access.deny-all = "enable" }
Directory deny access
$PHYSICAL["path"] !~ "^/srv/example.org/" { access.deny-all = "enable" }
Directory deny access (1.4x versions)
$HTTP["url"] =~ "^/libraries" { url.access-deny = ("") }
Updated by gstrauss over 8 years ago · 20 revisions