server { server_name _; listen 80; location / { root /var/www/html; index index.html index.htm; } location CLIENT_WSPATH { proxy_redirect off; proxy_pass http://127.0.0.1:LISTENING_PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; } location ~ \.php$ { deny all; } }