We have an Ubuntu server running on port 80, with Plex running on port 32400. Edit the 000-default.conf file located in /etc/apache2/sites-enabled to look like the following:
<Location /web> ProxyPass http://localhost:32400/web ProxyPassReverse http://localhost:32400/web </Location> <Location /system> ProxyPass http://localhost:32400/system ProxyPassReverse http://localhost:32400/system </Location> <Location /servers> ProxyPass http://localhost:32400/servers ProxyPassReverse http://localhost:32400/servers </Location> <Location /accounts> ProxyPass http://localhost:32400/accounts ProxyPassReverse http://localhost:32400/accounts </Location> <Location /myplex> ProxyPass http://localhost:32400/myplex ProxyPassReverse http://localhost:32400/myplex </Location> <Location /photo> ProxyPass http://localhost:32400/photo ProxyPassReverse http://localhost:32400/photo </Location> <Location /clients> ProxyPass http://localhost:32400/clients ProxyPassReverse http://localhost:32400/clients </Location>
Make sure you have mod_proxy_http and mod_proxy enabled. One or both of these might already be enabled, but it won’t hurt to run the commands below:
sudo a2enmod proxy sudo a2enmod proxy_http
After the mods are enabled, restart apache:
sudo service apache2 restart
Now when you go to your server on port 80 with any of the locations (for instance, /web), Apache will seamlessly redirect the communication to port 32400. To your browser, and your network appliance that is blocking 32400, it will look like it is on port 80 still.
The first server is running fine like this. We had some trouble with second server setup where it didn’t seem to like “localhost” url. After changing it to the fully qualified domain name, it works like a charm.
Can you tell me whether or not I can just make a link within my apache server page for a customer to be able to press and be forwarded to plex seamlessly?
I am not aware of any other way to do it without going through the steps above. Sorry.
enabling proxy_http will auto-enable proxy as it is a dependency