toomuchio / plex-nginx-reverseproxy

Configuration to serve Plex Media Center https://plex.tv using Nginx https://nginx.com
659 stars 94 forks source link

How do I make this work with /plex instead of a subdomain? #37

Closed rcdailey closed 5 years ago

rcdailey commented 5 years ago

I want to access plex using https://domain.com/plex, instead of https://plex.domain.com. How can I achieve this? What parts of your script should I change?

toomuchio commented 5 years ago

This isn't a support forum, the config is provided as is, google around for a guide if you don't understand how it works. Issues are only for issues.

thistac commented 4 years ago

Hi! As this repository was the first one suggested by google, maybe others like me will also look for it... I made it work like this:

server {

        [...]

        location /plex/ {
                proxy_pass http://plex_backend/;
        }
        if ($http_referer ~ /plex/) {
                rewrite ^/web/(.*) /plex/web/$1? redirect;
        }
}

Refer on reddit Cheers