Answer the question
In order to leave comments, you need to log in
Why won't apache let me in?
At the root of the project is a file to which I restrict access via .htaccess (located in the same place), while allowing access from a specific ip:
<Files private.php>
order deny,allow
deny from all
allow from <ip>
</Files>
Answer the question
In order to leave comments, you need to log in
It turned out that apache is behind a reverse proxy. I solved it with this config:
SetEnvIF X-Forwarded-For "x.x.x.x" AllowIP
<Files private.php>
order deny,allow
deny from all
allow from env=AllowIP
</Files>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question