Skip to content

Instantly share code, notes, and snippets.

@misuchiru03
Last active April 29, 2019 03:54
Show Gist options
  • Save misuchiru03/415d8af2d8dd30a4bdbd1387e6ac8b35 to your computer and use it in GitHub Desktop.
Save misuchiru03/415d8af2d8dd30a4bdbd1387e6ac8b35 to your computer and use it in GitHub Desktop.
Nginx Reverse Proxy with Plex and Deluge subdomains
# Plex Server
upstream plex.domain.org {
server 127.0.0.1:32400;
keepalive 32;
}
server {
listen 443;
server_name plex.domain.org;
ssl_certificate /etc/letsencrypt/live/domain.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.org/privkey.pem;
ssl on;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/reverseproxy.access.log;
location / {
rewrite ^ https://plex.domain.org/web/ last;
}
location /web {
proxy_pass http://plex.domain.org;
}
}
#To Deluge
#Deluge web-ui must be running in order to get this to work
#Upstream to Deluge
upstream deluge.domain.org {
server 127.0.0.1:8112;
keepalive 32;
}
server {
listen 443 ssl http2;
ssl on;
server_name deluge.domain.org;
ssl_certificate /etc/letsencrypt/live/domain.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.org/privkey.pem;
location / {
proxy_pass https://deluge.domain.org;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment