1
0
mirror of https://github.com/Adam-Ant/media-server-in-a-box synced 2024-07-06 05:36:15 +00:00
media-server-in-a-box/nginx.cfg

97 lines
2.5 KiB
INI
Raw Normal View History

2016-09-13 22:31:48 +00:00
resolver 127.0.0.1;
server {
listen 80 default_server;
server_name "";
2016-09-13 22:31:48 +00:00
2017-03-02 00:20:03 +00:00
location / {
2017-03-02 01:53:55 +00:00
root /www;
index index.php;
location ~ \.php$ {
2017-03-02 00:20:03 +00:00
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
2017-04-08 17:25:01 +00:00
location /auth-admin {
internal;
rewrite ^ /auth.php?admin;
}
location /auth-user {
internal;
rewrite ^ /auth.php?user;
}
2017-03-02 00:20:03 +00:00
location /plex {
2016-09-13 22:31:48 +00:00
set $test "";
2017-04-08 17:25:01 +00:00
# # 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;
# }
2016-09-13 22:31:48 +00:00
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;
2016-09-13 23:21:08 +00:00
proxy_pass http://plex:32400;
2016-09-13 22:31:48 +00:00
# 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
}
location /deluge {
2017-04-08 17:25:01 +00:00
auth_request /auth-admin;
2017-03-01 21:14:33 +00:00
proxy_pass http://deluge:8112/;
proxy_set_header X-Deluge-Base "/deluge/";
2016-09-13 22:31:48 +00:00
}
location /sickrage {
2017-04-08 17:25:01 +00:00
auth_request /auth-admin;
2016-09-13 23:21:08 +00:00
proxy_pass http://sickrage:8081;
2016-09-13 22:31:48 +00:00
}
location /nzbget {
2017-04-08 17:25:01 +00:00
auth_request /auth-admin;
2017-03-01 20:23:35 +00:00
proxy_pass http://nzbget:6789;
2016-09-13 22:31:48 +00:00
}
location /plexpy {
2017-04-08 17:25:01 +00:00
auth_request /auth-user;
2016-09-13 22:31:48 +00:00
proxy_pass http://plexpy:8181;
}
2017-06-08 12:50:38 +00:00
location /radarr {
2017-04-08 17:25:01 +00:00
auth_request /auth-admin;
2017-06-08 12:50:38 +00:00
proxy_pass http://radarr:7878;
2016-09-13 22:31:48 +00:00
}
2017-05-27 22:10:19 +00:00
location /hydra {
auth_request /auth-admin;
proxy_pass http://hydra:5075;
}
2017-02-08 23:46:50 +00:00
}