proxy_cache_path /tmp/NGINX_cache1/ keys_zone=name1:10m;
map $http_upgrade $connection_upgrade {
default upgrade;
' ' close;
}
upstream streamName {
# Use IP Hash for session persistence
ip_hash;
server localhost:3001;
}
server {
listen 80;
server_name example.com;
location / {
client_max_body_size 80M;
proxy_pass http:
proxy_cache name1;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}