Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blog:plex_virtual_hosting [2014/07/28 03:13] – brett | blog:plex_virtual_hosting [2019/12/13 21:18] (current) – [My solution] brett | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PLEX virtual | + | ====== PLEX virtual |
- | I had googled all around trying to find a solution to the problem of virtual | + | I had googled all around trying to find a solution to the problem of setting up a virtual |
+ | |||
+ | Instead of typing this into a browser | ||
+ | < | ||
+ | http:// | ||
+ | </ | ||
+ | I want to be able to enter this | ||
+ | < | ||
+ | http:// | ||
+ | </ | ||
This was pretty damn close: http:// | This was pretty damn close: http:// | ||
- | However it did not completely work and required a small adjustment | + | However it did not completely work and required a small adjustment |
===== My solution ===== | ===== My solution ===== | ||
- | Modify my DNS server to setup a CNAME for cheese this already hosts a webserver on port 80 and its where I also want to run PLEX. | + | Modify my DNS server to setup a CNAME for cheese this already hosts an apache |
< | < | ||
cheese | cheese | ||
Line 32: | Line 41: | ||
ProxyRequests off | ProxyRequests off | ||
ProxyPreserveHost On | ProxyPreserveHost On | ||
+ | ProxyPass / ws:// | ||
+ | ProxyPassReverse / ws:// | ||
+ | ProxyPass / wss:// | ||
+ | ProxyPassReverse / wss:// | ||
ProxyPass / http:// | ProxyPass / http:// | ||
ProxyPassReverse / http:// | ProxyPassReverse / http:// | ||
Line 46: | Line 59: | ||
The crucial piece of the puzzle is the QUERY_STRING conditional. | The crucial piece of the puzzle is the QUERY_STRING conditional. | ||
+ | The inclusion of the WebSocket proxying is also crucial for activity feedback. | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | For your convenience the precompiled module {{: | ||
+ | |||
+ | Edit apache configuration to support websockets | ||
+ | < | ||
+ | # vi / | ||
+ | LoadModule proxy_wstunnel_module modules/ | ||
+ | </ | ||
+ | |||
+ | ==== 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 ===== | ||
- | I find it useful | + | I find it useful |
This additional QUERY_STRING conditional was figured out by enabling debug on the rewrite rules by putting this into the virtual host rewrite section. | This additional QUERY_STRING conditional was figured out by enabling debug on the rewrite rules by putting this into the virtual host rewrite section. |