[ collider ] webrtc websocket related
自己架設 collider 有幾點要注意
1. 一定要先開一個 nginx 並且保證使用 http get 此台網址的 response 要是成功的
2. nginx 設定如下
4. 如果要上到production的話必須要讓 --tls設定為true
1. 一定要先開一個 nginx 並且保證使用 http get 此台網址的 response 要是成功的
2. nginx 設定如下
server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index.html index.htm index.nginx-debian.html; server_name _; location /.well-known { root /var/www/ws.DOMAIN.com; } location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } }3. /home/ubuntu/apprtc/src/collider/collider/collidermain/main.go內記得將
var roomSrv = flag.String("room-server", "https://api_server_domain", "The origin of the room server")api_server_domain換成自己的 server domain
4. 如果要上到production的話必須要讓 --tls設定為true
sudo $GOPATH/bin/collidermain -port=8089 -tls=true5. 並且將/home/ubuntu/apprtc/src/collider/collider/collider.go內底下這行的憑證給抽換成自己的
e = server.ListenAndServeTLS("/etc/letsencrypt/live/ws.api_server_domain.com/fullchain.pem", "/etc/letsencrypt/live/ws.api_server_domain.com/privkey.pem")
留言
張貼留言