从 Plex 服务器 URL 中删除 /web/index.html#!/

时间:2021-06-09 03:19:12

标签: nginx url-rewriting nginx-reverse-proxy plex

我当前的 Nginx 配置(如下)将在任何地方在网络浏览器地址栏中键入:https://plex.mydomain.com 时成功将我带到 Plex 媒体服务器的网络界面。

但是,在显示 Web 界面后,该 URL 会立即自动(永久)转发到: https://plex.mydomain.com/web/index.html#!/

如何使用重写指令在我的网络浏览器的地址栏中持续显示:https://plex.mydomain.com 而不是 https://plex.mydomain.com/web/index.html#!/

    server {
            listen 443 ssl http2; 
            listen [::]:443 ssl http2;
            ssl_certificate     ./ssl/fullchain.cer;
            ssl_certificate_key ./ssl/cert.key;
            server_name  plex.mydomain.com;
            location / {
                proxy_pass http://localhost:32400;
                proxy_set_header Accept-Encoding "";
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection $http_connection;                }
    }

我尝试将以下行添加到上面的配置中,但没有任何区别。

rewrite /web/index.html#!/(.*) /$1 break;

我也试过下面这行;这也没有任何区别:

rewrite /web/index.html/(.*) /$1 break;

0 个答案:

没有答案