Setting up plex behind NGINX Reverse Proxy

I’m trying to set up plex behind my NGINX reverse proxy to improve performance and avoid using plex servers as much as poss. I have the following config;

server {
listen 443 ssl;
listen [::]:443 ssl;

server_name plex.*;

include /config/nginx/ssl.conf;

client_max_body_size 0;
proxy_redirect off;
proxy_buffering off;

location / {
    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_app plex;
    set $upstream_port 32400;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    proxy_set_header X-Plex-Client-Identifier $http_x_plex_client_identifier;
    proxy_set_header X-Plex-Device $http_x_plex_device;
    proxy_set_header X-Plex-Device-Name $http_x_plex_device_name;
    proxy_set_header X-Plex-Platform $http_x_plex_platform;
    proxy_set_header X-Plex-Platform-Version $http_x_plex_platform_version;
    proxy_set_header X-Plex-Product $http_x_plex_product;
    proxy_set_header X-Plex-Token $http_x_plex_token;
    proxy_set_header X-Plex-Version $http_x_plex_version;
    proxy_set_header X-Plex-Nocache $http_x_plex_nocache;
    proxy_set_header X-Plex-Provides $http_x_plex_provides;
    proxy_set_header X-Plex-Device-Vendor $http_x_plex_device_vendor;
    proxy_set_header X-Plex-Model $http_x_plex_model;
}

}

And i’ve added my url into the plex settings ‘https://plex.server.co.uk:443’.
When I hit plex.server.co.uk, i get a quick flash of 401 unauthorized then it redirects to ‘https://plex.server.co.uk/web/index.html’ where it just sits on the Plex logo that fills the screen, no prompt for login or taking me into the screen to see my media or anything. Am I missing something?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.