http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
map$http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstreamwebsocket {
server 127.0.0.1:8085;
}
server{
listen 8087;
location / {
proxy_passhttp://websocket;
proxy_read_timeout 300s;
proxy_set_headerHost $host;
proxy_set_headerX-Real-IP $remote_addr;
proxy_set_headerX-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_headerUpgrade $http_upgrade;
proxy_set_headerConnection $connection_upgrade;
}
error_page 500 502503 504 /50x.html;
location = /50x.html {
root html;
}
}
}