0

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
</Files>

and

[Mon Jun 11 08:00:51 2012] [error] [client x.x.x.x] client denied by server configuration: /var/www/html/apc.php
1
  • By 'doesn't work', please clarify what you mean - what response code are you getting? Jun 11, 2012 at 6:10

1 Answer 1

1

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 192.168.1.0/24

Your Config should look like this:

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

0

You must log in to answer this question.