[ collider ] webrtc websocket related

自己架設 collider 有幾點要注意
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=true
5. 並且將/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")




留言

這個網誌中的熱門文章

[MySQL] schema 與資料類型優化

[翻譯] 介紹現代網路負載平衡與代理伺服器