Mod access » History » Revision 17

Revision 16 (zkv, 2008-11-21 20:32) → Revision 17/28 (zkv, 2008-11-21 20:47)

h1. Module mod_access 


 h2. Description 

 The access module is used to deny access to files. 

 h2. Options 

 *url.access-deny* table{border:1px solid #dddddd;}. 
 Denies |_.Name|_.Description|_.Default value| 
 |url.access-deny|Denies access to all files with any of given trailing path names.  
 Default value:empty 

 *access.deny-all* names.|empty| 
 Denies |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 

 We might want to deny access to all files ended 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. 

 h3. url.access-deny 


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


 *access.deny-all usage* 
 h3. access.deny-all usage 


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


 *Directory h3. Directory deny access* 


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


 *Directory h3. Directory deny access (1.4x versions)* 


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