Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to convert some rules and settings from Apache to lighttpd but i'm stuck with this Files rule:

<Directory /var/www/html/attachments>  
<Files ~ "\.(php\d*|cgi|pl|phtml)$">  
   order allow,deny  
   deny from all  

Looking at the documentation i could see that i can use the url.access-deny.

$HTTP["url"] =~ "^/var/www/html/attachments" {
url.access-deny = ("")

But don't know how to convert the Files part, any idea?


share|improve this question

This should work:

$PHYSICAL["path"] =~ "\.(php\d*|cgi|pl|phtml)$" {
        access.deny-all = "enable" 
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.