问题
Need windows server setting to map the port domain
abc.com:8145 to abc.com
server {listen 8145; server_name abc.com;}
Need server and location config to reverse proxy it
can anyone provide the working example of redirecting website
回答1:
server {
listen 80;
server_name abc.com
location / {
proxy_pass http://127.0.0.1:8145; // the IP is your server ip.
proxy_set_header Host $host; //abc.com
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
来源:https://stackoverflow.com/questions/44196395/nginx-reverse-proxy-to-remove-port-number