Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am trying to block public access to apc.php file. Initially this configuration worked, now it doesn't. I know this is where the issue lies because when I comment out the ACL I can access the file just fine. Yes I've restarted the server on configuration changes. I've tried plenty of variants of allowing a host (using CIDR and the exact client IP).

<Files apc.php>
        Order Deny,Allow
        Deny from all
        Allow from 192.168.1


[Mon Jun 11 08:00:51 2012] [error] [client x.x.x.x] client denied by server configuration: /var/www/html/apc.php
share|improve this question
By 'doesn't work', please clarify what you mean - what response code are you getting? – Shane Madden Jun 11 '12 at 6:10
up vote 2 down vote accepted

You should change Order:

order allow,deny <- changed to make 'deny from' rules get applied after 'allow from'

and in allow from you must be more specific:

allow from

Your Config should look like this:

order allow,deny
deny from allow from <- removed the 'deny from all' - this will be implicit because of the 'order' directive above Satisfy any

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.