Last active
January 10, 2018 21:41
-
-
Save Fma965/540219ade8133e65542e9ec15651fe82 to your computer and use it in GitHub Desktop.
Cloud Media Server Nginx Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
satisfy any; | |
auth_basic "Failsafe Authentication"; | |
auth_basic_user_file /config/nginx/htpasswd; | |
auth_request /auth-user; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl default_server; | |
index index.php index.htm index.html; | |
server_name _; | |
ssl_certificate /config/cert/cert.cert; | |
ssl_certificate_key /config/cert/cert.key; | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA'; | |
ssl_prefer_server_ciphers on; | |
client_max_body_size 0; | |
root /config/www; | |
# -------------------- ORGANIZR ------------------ | |
location /auth-user { | |
internal; | |
proxy_pass http://SERVERIP:8085/auth.php?user; | |
proxy_set_header Content-Length ""; | |
} | |
location /auth-admin { | |
internal; | |
proxy_pass http://SERVERIP:8085/auth.php?admin; | |
proxy_set_header Content-Length ""; | |
} | |
# Organizr | |
location / { | |
include /config/nginx/proxy.conf; | |
proxy_pass http://SERVERIP:8085/; | |
} | |
# -------------------- SONARR ------------------ | |
location /sonarr { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/auth.conf; | |
proxy_pass http://SERVERIP:8989/sonarr; | |
} | |
# -------------------- RADARR ------------------ | |
location /radarr { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/auth.conf; | |
proxy_pass http://SERVERIP:7878/radarr; | |
} | |
# -------------------- OMBI ------------------ | |
location /ombi/ { | |
include /config/nginx/proxy.conf; | |
proxy_pass http://SERVERIP:3579; | |
} | |
if ($http_referer ~* /ombi/) {rewrite ^/dist/([0-9\d*]).js /ombi/dist/$1.js last;} | |
# -------------------- PLEX ------------------ | |
location /web { | |
include /config/nginx/proxy.conf; | |
proxy_pass http://SERVERIP:32400; | |
proxy_set_header Connection "upgrade"; | |
} | |
location /plex {proxy_pass http://SERVERIP:32400/web;} | |
# -------------------- NZBGET ------------------ | |
location ~ ^/nzbget($|./*) { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/auth.conf; | |
rewrite /nzbget/(.*) /$1 break; | |
proxy_pass http://SERVERIP:6789; | |
} | |
# -------------------- NZBHYDRA ------------------ | |
location /nzbhydra/ { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/auth.conf; | |
proxy_pass http://SERVERIP:5076/nzbhydra/; | |
} | |
# -------------------- NETDATA ------------------ | |
location /netdata {return 301 /netdata/;} | |
location ~ /netdata/(?<ndpath>.*) { | |
proxy_pass http://SERVERIP:19999/$ndpath$is_args$args; | |
include /config/nginx/auth.conf; | |
} | |
# -------------------- TAUTULLI ------------------ | |
location /tautulli/ { | |
include /config/nginx/proxy.conf; | |
proxy_pass http://SERVERIP:8182; | |
} | |
# -------------------- TRANSMISSION ------------------ | |
location /transmission { | |
include /config/nginx/proxy.conf; | |
include /config/nginx/auth.conf; | |
proxy_pass http://SERVERIP:9091; | |
} | |
# --------------- PHP LIBRARY PRESENTER -------------- | |
location /plpp { | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include /etc/nginx/fastcgi_params; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basic Proxy Config | |
proxy_http_version 1.1; | |
proxy_no_cache $cookie_session; | |
proxy_cookie_path / "/; HTTPOnly; Secure"; | |
client_max_body_size 100m; | |
client_body_buffer_size 128k; | |
send_timeout 5m; | |
proxy_read_timeout 240; | |
proxy_send_timeout 240; | |
proxy_connect_timeout 240; | |
proxy_pass_request_headers on; | |
# Proxy Headers | |
proxy_hide_header X-Frame-Options; | |
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-Proto $scheme; | |
proxy_set_header X-Forwarded-Host $server_name; | |
proxy_set_header Upgrade $http_upgrade; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment