Plex Server: A Pretty URL

The Article

This guide will allow you to access your Plex Media Server from a pretty domain instead of the IPaddress:Port/web that is usually required. In brief, once you install Plex, you will need to install the Apache webserver and then allow proxy passthrough for the port, and rewrite the URL to affix the “/web” to the end of the url. Here are the steps.

1.) Setup and configure plex (pretty straight forward with any web guide)
2.) Install apache2
3.) Enable the following mods:
a. $ sudo a2enmod proxy
b. $ sudo a2enmod proxy_http
c. $ sudo a2enmod proxy_balancer
d. $ sudo a2enmod lbmethod_byrequests
e. $ sudo a2enmod rewrite
4.) Modify the 000-default apache2 config according to this post: http://matt.coneybeare.me/how-to-map-plex-media-server-to-your-home-domain/
a. Add this to the file:


Order deny,allow
Allow from all


ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:32400/
ProxyPassReverse / http://127.0.0.1:32400/


RewriteEngine on
RewriteCond %{REQUEST_URI} !^/web
RewriteCond %{HTTP:X-Plex-Device} ^$
RewriteRule ^/$ /web/$1 [R,L]

5.) Restart apache
6.) I am using my router to redirect my domain. This could be done in that manner or with a hosts file
7.) Update the hostname in raspi-config to match the desired domain

Video

Notes and References

Affilates

Support Switched to Linux with our affiliates:

Amazon

Web Hosting:
A2Hosting
siteground

VPNs:
Get a VPN to stay private online.
NordVPN
Private Internet Access

Podcasting:
Looking at Podcasting? These links will help with either hosting the podcasts or viewing stats.
Blubrry Podcast Hosting
Blubrry Podcasting Stats

Search Website


Sponsored

Recent Articles