animeic 1 year ago
parent
commit
7f9cc4bbc4
1 changed files with 4 additions and 0 deletions
  1. 4 0
      nginx/conf.d/default.conf

+ 4 - 0
nginx/conf.d/default.conf

@@ -21,6 +21,10 @@ server {
     # client_body_buffer_size 30M;
     
     location / {
+       proxy_set_header Host $host:$server_port; #远程主机 IP:PORT
+       proxy_set_header X-Real-PORT $remote_port; #远程端口
+       proxy_set_header X-Real-IP $remote_addr; #远程地址
+       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #远程代理地址
        proxy_pass  http://baishuihu:8101/;
     }