我試圖讓Plex和OwnCloud都能與Apache一起工作。我目前正在設置Plex,來自http://server.com/
的請求會被重寫並代理到localhost:32400/web/
。我做到這一點具有以下配置:Apache重寫多個REQUEST_URI
<VirtualHost *:80>
ServerName mattstv.xyz
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/owncloud$
RewriteCond %{HTTP:X-Plex-Device} ^$
RewriteRule ^/$ /web/$1 [P,R]
ProxyRequests Off
ProxyPreserveHost On
ProxyPass/http://127.0.0.1:32400/
ProxyPassReverse/http://127.0.0.1:32400/
</VirtualHost>
我想保留這種設置,因爲它使我的家人從感到困惑時,他們在瀏覽器中看到32400/web/index.html
。
我已將OwnCloud添加到服務器,並試圖讓http://server.com/owncloud
未被代理或重寫。我有一個規則來檢查REQUEST_URI
中的/owncloud
,但它似乎沒有工作。
要http://server.com/owncloud
<MediaContainer size="0" content="plugins"></MediaContainer>
它看起來像它的拉動主要頁面了,但沒有任何腳本是基於調試解決所時,我得到如下回應
當我完全禁用虛擬主機時,OwnCloud URL可以正常工作。
從閱讀Apache文檔我相信如果重寫條件失敗,代理不會發生?