mirror of
https://github.com/Adam-Ant/media-server-in-a-box
synced 2024-11-12 15:36:22 +00:00
87 lines
2.0 KiB
INI
87 lines
2.0 KiB
INI
resolver 127.0.0.1;
|
|
server {
|
|
listen 80;
|
|
server_name plex.genie;
|
|
|
|
location / {
|
|
set $test "";
|
|
|
|
# If a request to / comes in, 301 redirect to the main plex page,
|
|
# but only if it doesn't contain the X-Plex-Device-Name header or query argument.
|
|
# This fixes a bug where you get permission issues when accessing the web dashboard.
|
|
if ($http_x_plex_device_name = '') {
|
|
set $test A;
|
|
}
|
|
if ($arg_X-Plex-Device-Name = '') {
|
|
set $test "${test}B";
|
|
}
|
|
if ($test = AB) {
|
|
rewrite ^/$ http://$http_host/web/index.html;
|
|
}
|
|
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_pass http://plex:32400;
|
|
|
|
# Plex proxy settings.
|
|
proxy_redirect off;
|
|
proxy_buffering off;
|
|
|
|
## Required for Websockets
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_read_timeout 36000s; ## Timeout after 10 hours
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name deluge.genie;
|
|
|
|
location / {
|
|
proxy_pass http://deluge:8112;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name sickrage.genie;
|
|
|
|
location / {
|
|
proxy_pass http://sickrage:8081;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name nzbget.genie;
|
|
|
|
location / {
|
|
proxy_pass http://nzbget:6791;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name plexpy.genie;
|
|
|
|
location / {
|
|
proxy_pass http://plexpy:8181;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name couchpotato.genie;
|
|
|
|
location / {
|
|
proxy_pass http://couchpotato:5050;
|
|
}
|
|
}
|
|
server {
|
|
listen 80;
|
|
server_name headphones.genie;
|
|
|
|
location / {
|
|
proxy_pass http://headphones:8181;
|
|
}
|
|
}
|