Link Search Menu Expand Document

— proxy

desc: Transfers request to another server context: location

proxy_pass

proxy_set_header <header>

desc: Redefine headers sent to proxy eg: l

# headers unchanged
proxy_set_header Host $http_host;

proxy_redirect [ default | off | ]

eg:
# request to localhost:8000/two/foo -> frontend/one/foo
proxy_redirect http://localhost:8000/two/ http://frontend/one;

Cook

Basics

location / {
  proxy_pass        http://localhost:8000;
  proxy_set_header  X-Real-IP  $remote_addr;
}

Copyright © 2020 Thence LLC