Plex Web without Port using a Reverse Proxy (CentOS 7)

Using a CentOS 7 box running a Plex Media Server and an Apache reverse proxy on the same box without a domain name and only an IP address and after much trial and error, a working Apache configuration file finally materializes.

The goal was to eliminate the need of typing the port number to access the Plex Media Server web browser interface. The out-of-box web address may look something like this, http://IP.AD.DR.ESS:32400/web/index.html. The goal, http://IP.AD.DR.ESS/web.

Using an existing Apache reverse proxy, a configuration file was created and added to the directory, /ect/httpd/conf.d as plex.conf for example.

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://IP.AD.DR.ESS:32400/
ProxyPassReverse / http://IP.AD.DR.ESS:32400/

RewriteCond %{REQUEST_URI} !^/web
RewriteCond %{HTTP:X-Plex-Device} ^$
RewriteCond %{QUERY_STRING} (^|&)X-Plex-Device=(&|$) [OR]
RewriteCond %{QUERY_STRING} !(^|&)X-Plex-Device=
RewriteRule ^/$ /web/\ [R,L]

This one works too. Tested 8/22/2019.

ProxyRequests Off
roxyPreserveHost 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/\ [R,L]

Once completed, the Apache service was reloaded/restarted and the configuration takes immediate effect. The goal is achieved with http://IP.AD.DR.ESS/web.

Source(s)
http://matt.coneybeare.me/how-to-map-plex-media-server-to-your-home-domain/