-
Notifications
You must be signed in to change notification settings - Fork 75
DeployByNginx
adwpc edited this page May 31, 2020
·
1 revision
git clone https://github.com/pion/ion-app-web
cd ion-app-web
npm i
npm run build
http {
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 8080;
# ssl setting, copy the *.pem to nginx.conf dir
# you can run './scripts/makeKey.sh' to create them to configs
ssl on;
ssl_certificate /usr/local/etc/nginx/cert.pem;
ssl_certificate_key /usr/local/etc/nginx/key.pem;
# ws proxy to biz, biz should listen on 8443 without ssl
location /ws {
proxy_pass http://localhost:8443/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# 1 run 'npm run build' in ion-app-web dir
# 2 then copy dist/* to nginx's html dir
location / {
root html;
index index.html index.htm;
}
}
}