I do use following proxy set options.
ocation / {
proxy_pass http://backend;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-Port 80;
I am using 2 layer NGINX. Fist layer NGINX works as a load balancer and
forwards all HTTP traffic another NGINX based on HTTP or HTTPS.
When i setup below conditions its not working.
location / {
satisfy any;
allow xx.xx.xx.xx/32;
allow yy.yy.yy.yy/32;
auth_basic "Restricted"
auth_basic_use