1

由于最近更新了 plex,我的 plex 反向代理停止工作。我尝试四处搜索,但没有找到太多信息。下面列出的是配置文件,有没有人有 plex 并知道出了什么问题?我只是得到了一个 404 not found 页面

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/;
  }

}
4

2 回答 2

1

这是我的完美作品:

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;
        }
 }
于 2017-10-16T08:55:57.943 回答
0

需要检查的一些事项:

  • 运行`sudo netstat -nlp | grep ':32400' 以确保在预期的端口上仍有一些东西在运行。
  • 从运行 Nginx 和 Plex 的机器上,尝试直接连接到 URL。这两个都应该工作:`curl http://127.0.0.1:32400/和 curl http://127.0.0.1:32400/web/

如果这些测试中的任何一个失败,则问题出在 Plex 而不是 Nginx。在这种情况下,您发布您的 Plex 配置。

检查 Plex 的变更日志也是一个好主意。如果自上次更新 Plex 以来可能对您造成问题的更改,更改日志中是否有提及?

于 2016-01-19T01:56:38.623 回答