OSP. Fixing Nginx config to fix OSP bug and also fix WebSockets.
This commit is contained in:
parent
12f88a5e2b
commit
aa775fb882
|
@ -7,16 +7,41 @@ server {
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
|
||||||
auth_basic "Authentication needed";
|
|
||||||
auth_basic_user_file /var/www/osp.server.tld/.htpasswd;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:8585;
|
proxy_pass http://127.0.0.1:8585;
|
||||||
|
// Workaround for OSP bug: https://gitlab.com/Deamos/flask-nginx-rtmp-manager/-/issues/176
|
||||||
|
proxy_set_header Host $server_name;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /socket.io {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
|
||||||
|
proxy_set_header X-NginX-Proxy true;
|
||||||
|
|
||||||
|
# prevents 502 bad gateway error
|
||||||
|
proxy_buffers 8 32k;
|
||||||
|
proxy_buffer_size 64k;
|
||||||
|
|
||||||
|
proxy_redirect off;
|
||||||
|
|
||||||
|
# enables WS support
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
proxy_pass http://127.0.0.1:8585/socket.io;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#include config/gzip.conf;
|
#include config/gzip.conf;
|
||||||
|
|
||||||
# Wildcard certificate config
|
# Certificate config
|
||||||
#include ssl/server.tld.conf;
|
#include ssl/server.tld.conf;
|
||||||
#include config/ssl.conf;
|
#include config/ssl.conf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue