# Add this block to the http{} section of your main nginx.conf # (typically /etc/nginx/nginx.conf), NOT inside vitfit.conf. # It enables WebSocket upgrade pass-through for socket.io. map $http_upgrade $connection_upgrade { default upgrade; '' close; }