nginx相关(Nginx related)

  • location /msgHub {
  • proxy_pass http://localhost:8888;
  • #后端的Web服务器可以通过X-Forwarded-For获取用户真实IP
  • proxy_set_header Host $host;
  • proxy_set_header X-Real-IP $remote_addr;
  • proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  • #启用http长连接支持websocket
  • proxy_http_version 1.1;
  • proxy_set_header Upgrade $http_upgrade;
  • proxy_set_header Connection “upgrade”;
  • }
————————
  • location /msgHub {
  • proxy_pass http://localhost:8888;
  • #The back-end web server can obtain the user’s real IP through x-forward-for
  • proxy_set_header Host $host;
  • proxy_set_header X-Real-IP $remote_addr;
  • proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  • #启用http长连接支持websocket
  • proxy_http_version 1.1;
  • proxy_set_header Upgrade $http_upgrade;
  • proxy_set_header Connection “upgrade”;
  • }