I am trying to get both Plex and OwnCloud working with Apache. I currently have Plex set up correctly, requests coming from http://server.com/
get rewritten and proxied to localhost:32400/web/
. I achieve this with the following configuration:
<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>
I wish to keep this setup as it keeps my family from getting confused when they see 32400/web/index.html
in their browser.
I have added OwnCloud to the server and am trying to get http://server.com/owncloud
to NOT get proxied or rewritten. I have a rule to check for /owncloud
in the REQUEST_URI
but it doesn't appear to be working.
I get the following response when going to http://server.com/owncloud
<MediaContainer size="0" content="plugins"></MediaContainer>
It looks like it's pulling the main page up but none of the scripts are resolving based on the debugger:
When I completely disable the virtual host the OwnCloud URL works correctly.
From reading Apache documentation I believe the proxy will not occur if the rewrite conditions fail?