Skip to content

Instantly share code, notes, and snippets.

@Dan0sz Dan0sz/openmediavault-plex
Last active Oct 21, 2018

What would you like to do?
Nginx Server-block for Reverse Proxy for Plex in OpenMediaVault to place in /etc/nginx/sites-available/.
server {
listen [::]:443;
rewrite https://$host$request_uri? permanent;
error_log /var/log/nginx/openmediavault-plex_error.log error;
access_log /var/log/nginx/openmediavault-plex_access.log combined;
ssl on;
# These are the paths to your generated Let's Encrypt SSL certificates.
ssl_certificate /etc/letsencrypt/live/;
ssl_certificate_key /etc/letsencrypt/live/;
# To generate your dhparam.pem file, run `openssl dhparam -out /etc/nginx/dhparam.pem 2048` (without the quotes) in your terminal.
ssl_dhparam /etc/nginx/dhparam.pem;
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:60m;
location / {
# IP address of Plex Media Server
proxy_buffering off;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_cookie_path /web/ /;
access_log off;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.