41 lines
974 B
Plaintext
41 lines
974 B
Plaintext
upstream minimal-webrtc {
|
|
# Set this to the actual path of the unix socket.
|
|
server unix:/var/run/minimal-webrtc.sock;
|
|
}
|
|
server {
|
|
listen 443 ssl http2 default_server;
|
|
listen [::]:443 ssl http2 default_server;
|
|
|
|
# Use self-signed certificate.
|
|
ssl_certificate /etc/ssl/certs/localhost.crt;
|
|
ssl_certificate_key /etc/ssl/private/localhost.key;
|
|
|
|
ssl_protocols TLSv1.2;
|
|
|
|
root /var/www/html-ssl;
|
|
|
|
index index.html;
|
|
|
|
server_name _;
|
|
|
|
location / {
|
|
try_files $uri $uri/ @proxy_to_app;
|
|
}
|
|
location @proxy_to_app {
|
|
proxy_pass http://minimal-webrtc;
|
|
|
|
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;
|
|
|
|
# This header has to match the settings.py file.
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|