Problem: I have some files under /var/www/files/ that I want them to be accessed from specific IP addresses WITHOUT requiring user/password. However, I would like that any o
If your server is behind a proxy, you can't rely on the Require ip directly. However, you can use the Require env:
AuthType Basic
AuthName "Please enter your username and password"
AuthUserFile /var/www/files/.htpasswd
SetEnvIF X-Forwarded-For "22.33.44.55" AllowIP
Require env AllowIP
Require valid-user
The source of the idea