I want to redirect my websocket to another server. As we known, nginx command rewrite or redirect can do such a kind of http request, however, they do not work to redirect websocket. I was testing them and found the solution: location ~ /ws { proxy_p