基於 Apache URL 的代理重定向

基於 Apache URL 的代理重定向

我最近在我的伺服器上安裝了 PLEX Media Server,但我在將其隱藏在 Apache 代理程式後面時遇到了一些困難...

我發現了vhost 配置允許基於子網域的 PLEX 存取(例如:plex.example.com)。我的問題是我不想創建特定的子網域,所以我更喜歡進行基於(透明)URL 的重定向,如下所示:

我的 PLEX 伺服器 URL:http://example.com:32400/web/index.html

我想要的是 :https://example.com/plex/index.html

我嘗試了以下虛擬主機配置:

<VirtualHost *:443>
ServerName example.com

ProxyRequests off
ProxyPreserveHost On
ProxyPassMatch ^/plex/(.*)$ http://localhost:32400/web/$1
ProxyPassReverse /web http://localhost:32400/web

</VirtualHost>

但它不能正常工作。

相關內容