Nginx reverse proxy configuration template

Nginx reverse proxy configuration template

Full Reverse Proxy

1
2
3
4
5
6
7
8
location / 
{
proxy_pass http://localhost:37373;
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 REMOTE-HOST $remote_addr;
}

API Only Proxy

1
2
3
4
5
location /api
{
proxy_method POST;
proxy_pass http://localhost:30330/;
}