rtc_demo/etc/nginx/sites-available/rtc

45 lines
1.0 KiB
Plaintext

server {
server_name *your.server.dns.name*;
listen 443 ssl;
listen [::]:443 ssl;
default_type text/html;
ssi on;
ssl_certificate */etc/your/fullchain.pem*;
ssl_certificate_key */etc/your/privkey.pem*;
root /var/www/rtc/;
location /static/ {
alias /var/www/rtc/;
}
location / {
proxy_pass http://127.0.0.1:8000;
include /etc/nginx/proxy_params;
}
location /ws/ {
proxy_pass http://127.0.0.1:8001/ws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
server {
if ($host = demo.kww.us) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name demo.kww.us;
return 404; # managed by Certbot
}