# $connection_upgrade — WebSocket upgrade helper for the maven. block # in nginx.conf. Install this ONLY if your nginx does not already define # $connection_upgrade somewhere in the http context. # # It is a separate file because nginx treats a duplicate `map` directive as a # fatal configuration error, not a warning: if this block were inside # nginx.conf and your setup already had one (nginx-panel and most WebSocket # recipes ship one), the next `nginx -s reload` would fail the config test and # nginx would refuse to come back up — taking every other site on the box down # with it, not just maven. # # Check before installing: # grep -rn 'connection_upgrade' /etc/nginx/ # Nothing? Drop this in /etc/nginx/conf.d/ and reload. Something already there? # Skip this file entirely; nginx.conf works as-is. # # Verify either way before reloading: # nginx -t map $http_upgrade $connection_upgrade { default upgrade; '' close; }