When the server is accessed via a proxy server or load balancer, the connection source IP address is that of those devices, so the normal block writing method cannot be used.
order allow,deny allow from all deny from 255.255.255.255
In that case, use “X-Forwarded-For”.
SetEnvIf X-Forwarded-For “255\.255\.255\.255” denied_ip order allow,deny allow from all deny from env=denied_ip
This article is a migration article from the blog “Technical Notes for Chores Engineers”. The previous blog will be deleted.