1

Since a recent update of plex, my reverxe proxy for plex stopped working. I tried searching all around, but I didn't find much info. Listed below is the config file, does anyone have plex and know what goes wrong? I simply get served with a 404 not found page

server {
  listen 80;

  if ($http_referer ~* /plex/) {
    rewrite ^/web/(.*) /plex/$1? redirect;
  }
  root /var/www;

  location /plex/ {
    proxy_pass http://127.0.0.1:32400/web/;
  }

  location /plexapi/ {
    proxy_pass http://127.0.0.1:32400/;
  }

}
jelmew
  • 543
  • 1
  • 7
  • 15

2 Answers2

1

Here is mine which works perfectly:

server {
        listen        443;
        server_name  plex.mydoamin.com ;
        satisfy any;
        ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem;


        location = / {
                rewrite ^ /web/;
                proxy_redirect http:// $scheme://;
                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;
        }
        location / {
                proxy_pass  http://192.168.1.14:32400/;
                proxy_redirect http:// $scheme://;
                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;
                index  index.html index.htm;
        }
 }
radar
  • 500
  • 1
  • 6
  • 24
0

Some things to check:

  • Run `sudo netstat -nlp | grep ':32400' to make sure there is still something running on the expected port.
  • From withing the machine running Nginx and Plex, try connecting directly to the URL. Both of these should work: `curl http://127.0.0.1:32400/ and curl http://127.0.0.1:32400/web/ ;

If any of these tests fail, the problem with Plex and not Nginx. In which case, you post your Plex configurations.

It's also a good idea to check the Changelog for Plex. Are there mentions in the Changelog if changes that might be problematic for you since the last time you updated Plex?

Mark Stosberg
  • 12,961
  • 6
  • 44
  • 49
  • Everything works, except curl http://127.0.0.1:32400/web/ which returns epty. But that is due to plex way of rewiring stuff, if accesed by browser, it will start the plexweb. – jelmew Jan 19 '16 at 17:42