0

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

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

如何使用 rewrite 指令在我的网络浏览器的地址栏中永久显示: 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;
4

0 回答 0