How to debug apache allow / deny rules?

I tried adding a LogLevel Debug , but all I get is

 client denied by server configuration: /somedir/html/file.html 

I have a complicated allow / deny rule for one location, which can be reduced to this to reproduce my problem:

 <LocationMatch "/somedir/(.*)\.html" > SetEnvIf Referer "^https?\:\/\/[^\/\?\#]*domain\.com(\:\[0-9]+)?([\/\?\#]|$)" SAME_ORIGIN_HOST_CHECK=1 SetEnv DEV_BUILD_ALLOW 1 Order deny,allow Deny from all Allow from env=SAME_ORIGIN_HOST_CHECK Allow from env=DEV_BUILD_ALLOW </LocationMatch> 

the referrer coming from domain.com works fine, but the dev build var installation is ignored.

Is there a way to get more verbose log output as possible with mod rewrite, but for allow / deny rules?

+6
source share

Source: https://habr.com/ru/post/958895/


All Articles