NGINX Source IP

From UVOO Tech Wiki
Revision as of 23:48, 24 August 2020 by Busk (talk | contribs) (Created page with "https://serverfault.com/questions/439631/nginx-as-proxy-using-a-specific-source-ip ``` proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

https://serverfault.com/questions/439631/nginx-as-proxy-using-a-specific-source-ip

proxy_set_header Host $host;
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 $scheme;

location /integracao/ {
    proxy_bind A.A.A.A;
    proxy_pass http://X.X.X.X:9080/integracao/;
}

location /solr/ {
    proxy_bind B.B.B.B;
    proxy_pass http://Y.Y.Y.Y:8080/solr/;
}