Answer the question
In order to leave comments, you need to log in
Gorilla websockets under nginx + ssl - how to do it?
There is a site that has nginx at the entrance, which proxies requests, depending on the url, either to the goroutine server with the application, or to wordpress.
The goroutine also has a websocket. The configuration worked quite well until the installation of ssl on nginx, after installation it does not function (which is generally expected).
Proxying is carried out as follows:
location = /ws {
proxy_pass http://localhost:9000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Answer the question
In order to leave comments, you need to log in
What websocket address is used on the client? If you have https on the server, then the address must begin with wss://, not ws://
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question