Module mod_access


The access module is used to deny access to files.


Denies access to all files with any of given trailing path names.
Default value:empty

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

You might want to deny access to all files ending with a tilde (~) or .inc because of:

  1. Text editors often use a trailing tilde for backup files.
  2. And the .inc extension is often used for include files with code.


    url.access-deny = ( "~", ".inc")

access.deny-all usage

    $PHYSICAL["path"] =~ "(~|\.inc)$" {
        access.deny-all = "enable" 

Directory deny access

    $PHYSICAL["path"] !~ "^/srv/" {
        access.deny-all = "enable" 

Directory deny access (1.4x versions)

    $HTTP["url"] =~ "^/libraries" {
        url.access-deny = ("")