nginx forward port

Thatchai
Jun 4, 2023

flow

internet -> nginx -> localhost:8080


location / {
proxy_pass http://localhost:8080/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}

--

--