forked from tsaridas/stremio-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx-prefix.conf
56 lines (45 loc) · 1.54 KB
/
nginx-prefix.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# stremio.mydomain.com
# ------------------------------------------------------------
map $scheme $hsts_header {
https "max-age=63072000; preload";
}
server {
set $forward_scheme http;
set $server "stremio-container";
set $port 8080;
listen 80;
listen [::]:80;
listen 443 ssl;
listen [::]:443 ssl;
server_name stremio.mydomain.com;
# Let's Encrypt SSL
include conf.d/include/letsencrypt-acme-challenge.conf;
include conf.d/include/ssl-ciphers.conf;
ssl_certificate /etc/letsencrypt/live/npm-4/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/npm-4/privkey.pem;
access_log /data/logs/proxy-host-11_access.log proxy;
error_log /data/logs/proxy-host-11_error.log warn;
# Common proxy headers
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
# Stremio-specific route
location /stremio-server/ {
# Strip stremio-server
rewrite ^/stremio-server/(.*) /$1 break;
proxy_pass http://stremio-container:11470;
}
# Self hosted addons, in this case comet. Depends on the plugin if it supports a url prefix
location /comet {
proxy_pass http://stremio-comet:8111;
}
# Stremio web ui
location / {
# Proxy!
include conf.d/include/proxy.conf;
}
# Custom
include /data/nginx/custom/server_proxy[.]conf;
}