blog:plex_virtual_hosting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blog:plex_virtual_hosting [2014/07/28 10:34] – [PLEX virtual host configuration] brettblog:plex_virtual_hosting [2019/12/13 21:18] (current) – [My solution] brett
Line 14: Line 14:
 This was pretty damn close: http://matt.coneybeare.me/how-to-map-plex-media-server-to-your-home-domain/ This was pretty damn close: http://matt.coneybeare.me/how-to-map-plex-media-server-to-your-home-domain/
  
-However it did not completely work and required a small adjustment+However it did not completely work and required a small adjustment for my Plex server running on CentOS.
  
 ===== My solution ===== ===== My solution =====
Line 41: Line 41:
     ProxyRequests off     ProxyRequests off
     ProxyPreserveHost On     ProxyPreserveHost On
 +    ProxyPass / ws://127.0.0.1:32400/
 +    ProxyPassReverse / ws://127.0.0.1:32400/
 +    ProxyPass / wss://127.0.0.1:32400/
 +    ProxyPassReverse / wss://127.0.0.1:32400/
     ProxyPass / http://127.0.0.1:32400/     ProxyPass / http://127.0.0.1:32400/
     ProxyPassReverse / http://127.0.0.1:32400/     ProxyPassReverse / http://127.0.0.1:32400/
Line 55: Line 59:
 The crucial piece of the puzzle is the QUERY_STRING conditional.  We do NOT want to redirect "/?something" into "/web?something" as this will screw things up. The crucial piece of the puzzle is the QUERY_STRING conditional.  We do NOT want to redirect "/?something" into "/web?something" as this will screw things up.
  
 +The inclusion of the WebSocket proxying is also crucial for activity feedback.  This requires the mod_proxy_wstunnel.so module which is available with apache 2.4+
 +
 +As I was running CentOS 6.5 x64 which only has apache 2.2.15 I had to compile this module up myself by following the instructions here: http://notmyitblog.blogspot.com.au/2014/03/websockets-support-for-apache-httpd.html
 +
 +For your convenience the precompiled module {{:blog:mod_proxy_wstunnel.zip|}} which can be unzipped and dropped into /usr/lib64/httpd/modules you may need to chmod this to 755 after unzipping don't forget to enable this as well.
 +
 +Edit apache configuration to support websockets
 +<code>
 +# vi /etc/httpd/conf/httpd.conf
 +LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
 +</code>
 +
 +==== CentOS 7 ====
 +  * Disable SELINUX
 +  * Punch hole in firewall (or disable easier).
 +  * No need to install mod_proxy_wstunnel.
 ===== How it was debugged ===== ===== How it was debugged =====
  
  • blog/plex_virtual_hosting.1406543651.txt.gz
  • Last modified: 2014/07/28 10:34
  • by brett