Plex & Apache Configuration Issues


IceOnFire7 commented 21 hours ago

I’m attempting to setup Apache via windows 2008 to redirect Plex ATV 3 traffic to port 9999 instead of 80, which I’m using to host my domain. The ATV connects to the Plex Server perfectly with Apache disabled. However, when I connect via Apache redirect, I am getting the Trailers is not available error on my ATV. The only thing I may be missing is a VirtualHost entry for port 443, but I am not certain. Any suggestions?


Here is my Plex config:


[PlexConnect]

enable_plexgdm = True

ip_pms = 192.168.0.2

port_pms = 32400

enable_dnsserver = False (local DNS service running in Windows)

port_dnsserver = 53

ip_dnsmaster = 8.8.8.8

prevent_atv_update = True

enable_plexconnect_autodetect = True

ip_plexconnect = 0.0.0.0

hosttointercept = trailers.apple.com

port_webserver = 9999

enable_webserver_ssl = True

port_ssl = 443

certfile = ./assets/certificates/trailers.pem

loglevel = High

logpath = .


Here is my Apache Config:



ServerName plex.domain.com



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} ^<br> RewriteRule ^/ /web/$1 [R,L]


ServerName trailers.apple.com

RequestHeader set User-Agent AppleTV

ProxyRequests off

AllowEncodedSlashes NoDecode

ProxyPass / http://trailers.apple.com:9999/ nocanon

ProxyPassReverse / http://trailers.apple.com:9999/



Sent from my iPad using Tapatalk

Hi IceOneFire,

I'm no expert, so I can't give you any real advice, but after playing around with my apache configuration for a few hours, I finally got it to work with PlexConnect.  My files are below...maybe something in there will help you out.

PlexConnect Settings.cfg

enable_plexgdm = False

ip_pms = 192.168.1.104

port_pms = 32400

enable_dnsserver = True

port_dnsserver = 53

ip_dnsmaster = 192.168.1.1

prevent_atv_update = True

enable_plexconnect_autodetect = False

ip_plexconnect = 192.168.1.104

hosttointercept = trailers.apple.com

port_webserver = 8080

enable_webserver_ssl = True

port_ssl = 4443

certfile = /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.pem

loglevel = High

logpath = /home/"user"/PlexConnect/PlexConnect

Apache - note that there are two virtual hosts for port 80.  One server name is trailers.apple.com and the other is atv.plexconnect

 
ServerName trailers.apple.com
ServerAlias atv.plexconnect
 
    ProxyPreserveHost On
    ProxyRequests Off
        Order allow,deny
        Allow from all
   
    AllowEncodedSlashes NoDecode
    ProxyPass / http://192.168.1.104:8080/ nocanon
    ProxyPassReverse / http://192.168.1.104:8080/
 
 
 
ServerName atv.plexconnect
ServerAlias atv.plexconnect
 
    ProxyPreserveHost On
    ProxyRequests Off
         
                Order allow,deny
                Allow from all
         
    AllowEncodedSlashes NoDecode
    ProxyPass / http://192.168.1.104:8080/ nocanon
    ProxyPassReverse / http://192.168.1.104:8080/
 
 
 
ServerName trailers.apple.com
ServerAlias atv.plexconnect
 
SSLProxyEngine On
    ProxyPreserveHost On
    ProxyRequests Off
        Order allow,deny
        Allow from all
   
AllowEncodedSlashes NoDecode
    ProxyPass / https://192.168.1.104:4443/ nocanon
    ProxyPassReverse / https://192.168.1.104:4443/
 
    SSLEngine on
    SSLProtocol -ALL +SSLv3 +TLSv1
    SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT   
    SSLCertificateFile      /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.cer
    SSLCertificateKeyFile   /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.key
 
CustomLog ${APACHE_LOG_DIR}/proxy_ssl_access.log combined
 
 
Hope this helps!


Hi IceOneFire,

I'm no expert, so I can't give you any real advice, but after playing around with my apache configuration for a few hours, I finally got it to work with PlexConnect. My files are below...maybe something in there will help you out.

PlexConnect Settings.cfg

enable_plexgdm = False

ip_pms = 192.168.1.104

port_pms = 32400

enable_dnsserver = True

port_dnsserver = 53

ip_dnsmaster = 192.168.1.1

prevent_atv_update = True

enable_plexconnect_autodetect = False

ip_plexconnect = 192.168.1.104

hosttointercept = trailers.apple.com

port_webserver = 8080

enable_webserver_ssl = True

port_ssl = 4443

certfile = /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.pem

loglevel = High

logpath = /home/"user"/PlexConnect/PlexConnect


Apache - note that there are two virtual hosts for port 80. One server name is trailers.apple.com and the other is atv.plexconnect



ServerName trailers.apple.com
ServerAlias atv.plexconnect

ProxyPreserveHost On
ProxyRequests Off

Order allow,deny
Allow from all

AllowEncodedSlashes NoDecode
ProxyPass / http://192.168.1.104:8080/ nocanon
ProxyPassReverse / http://192.168.1.104:8080/





ServerName atv.plexconnect
ServerAlias atv.plexconnect

ProxyPreserveHost On
ProxyRequests Off

Order allow,deny
Allow from all

AllowEncodedSlashes NoDecode
ProxyPass / http://192.168.1.104:8080/ nocanon
ProxyPassReverse / http://192.168.1.104:8080/







ServerName trailers.apple.com
ServerAlias atv.plexconnect

SSLProxyEngine On
ProxyPreserveHost On
ProxyRequests Off

Order allow,deny
Allow from all

AllowEncodedSlashes NoDecode
ProxyPass / https://192.168.1.104:4443/ nocanon
ProxyPassReverse / https://192.168.1.104:4443/

SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:!LOW:!SSLv2:!EXPORT
SSLCertificateFile /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.cer
SSLCertificateKeyFile /home/"user"/PlexConnect/PlexConnect/assets/certificates/trailers.key

CustomLog ${APACHE_LOG_DIR}/proxy_ssl_access.log combined




Hope this helps!


Note ATV.plexconnect host is now longer required in the latest versions. (For a few months now)

Thanks for the update!

I copied your config for Plex and Apache, but unfortunately I am getting "Trailers Not Available".

Hi Guys,

can anybody please post the working apache proxys for port 80 and port 443.

Cheers Robert

Hi Guys,

can anybody please post the working apache proxys for port 80 and port 443.

Cheers Robert

This is what I use: https://github.com/tkimball83/plexconnect/blob/master/SOURCES/plexconnect.conf-httpd

Thanks tkimball83.

I will try it.

Hi tkimball83,

i tried your settings yesterday but unfortunately it is not working.

Does anyboady had owncloud and plex running together?

Cheers Robert

Robert, I was in your same situation.  Finally got it up and running.  Full writeup on my working solution (Apache on port 80/443, ownCloud, and PlexConnect) can be found over on my blog.  http://www.linuxtoolbox.ninja?p=60

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.