D
D
ddddd tttt2019-01-29 13:02:39
go
ddddd tttt, 2019-01-29 13:02:39

What certificates need to be specified for ssl on websocket?

ssl_certificate /etc/nginx/ssl/private.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;
There are some that give error 1015.

err := http.ListenAndServeTLS(":8081",
    "/etc/nginx/ssl/private.crt",
    "/etc/nginx/ssl/private.key", nil)
if err != nil {
    fmt.Println(err.Error())
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pavlyuk, 2019-01-29
@pav5000

Exactly the same as not on websocket.
If you still have nginx in the chain, then it's easier to entrust https to it, and forward it to the backend via

client_max_body_size 0;
proxy_http_version 1.1;
proxy_pass http://your.websocket.backend/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question