Plex proxy link doesn't work

Hello,

I’m currently have an issue where I can’t access using the following link, plex.kylecastle.co.uk however if you go via kylecastle.co.uk:32400 this works fine and the conf file suggests everything should work okay:

Plex.conf

<VirtualHost *:80>
ServerName plex.kylecastle.co.uk

<Proxy *>
     Order deny,allow
     Allow from all
</Proxy>

ProxyRequests Off

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://kylecastle.co.uk:32400/
ProxyPassReverse / http://kylecastle.co.uk:32400/

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

RewriteCond %{SERVER_NAME} =plex.kylecastle.co.uk
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Plex-le-ssl.conf

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName plex.kylecastle.co.uk

<Proxy *>
     Order deny,allow
     Allow from all
     AuthType None
     Require all granted
</Proxy>

ProxyRequests Off

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://kylecastle.co.uk:32400/
ProxyPassReverse / http://kylecastle.co.uk:32400/

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

# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.

# RewriteCond %{SERVER_NAME} =plex.kylecastle.co.uk
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
SSLCertificateFile /etc/letsencrypt/live/plex.kylecastle.co.uk/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/plex.kylecastle.co.uk/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>

It keeps returning a 503 error after a while any help will be much appreciated!

Many Thanks,
Kyle

Could you try this config:

Replace these fields (< PUT YOUR IP HERE >) in the config below as necessary…

    <Location /:/websockets/notifications>
        ProxyPass wss://<PUT YOUR IP HERE>:32400/:/websockets/notifications
        ProxyPassReverse wss://<PUT YOUR IP HERE>:32400/:/websockets/notifications
    </Location>

…&…

    ProxyPass / http://<PUT YOUR IP HERE>:32400/
    ProxyPassReverse / http://<PUT YOUR IP HERE>:32400/

revised plex.conf

ServerSignature Off
ServerTokens Prod

<VirtualHost *:80>
  ServerName plex.kylecastle.co.uk
  # This VirtualHost redirects everything to HTTPS on port 443.
  RewriteEngine On
  RewriteCond %{HTTPS} off
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

<VirtualHost *:443>
  ServerName plex.kylecastle.co.uk
  ServerAlias ""
  Options -Includes -ExecCGI

  RewriteEngine On
  RewriteCond %{THE_REQUEST} !HTTP/1.1$
  RewriteRule .* - [F]

  LimitRequestBody 512000
  SSLEngine On
  SSLCertificateFile /etc/letsencrypt/live/plex.kylecastle.co.uk/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/plex.kylecastle.co.uk/privkey.pem
  SSLProtocol +TLSv1.2

  Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
  Header always set X-Frame-Options DENY
  FileETag None
  TraceEnable off
  #Header edit Set-Cookie ^(.*)$ ;HttpOnly;Secure
  Header set X-XSS-Protection "1; mode=block"
  Timeout 60

    <Location /:/websockets/notifications>
        ProxyPass wss://<PUT YOUR IP HERE>:32400/:/websockets/notifications
        ProxyPassReverse wss://<PUT YOUR IP HERE>:32400/:/websockets/notifications
    </Location>
  
  <Proxy *>
	Order deny,allow
	Allow from all
  </Proxy>

    ProxyRequests Off
    ProxyPreserveHost On
    SSLProxyEngine On
    RequestHeader set Front-End-Https "On"
    ProxyPass / http://<PUT YOUR IP HERE>:32400/
    ProxyPassReverse / http://<PUT YOUR IP HERE>:32400/

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/web
    RewriteCond %{HTTP:X-Plex-Device} ^$
    RewriteCond %{REQUEST_METHOD} !^(OPTIONS)$
    RewriteRule ^/$ /web/$1 [R,L]
</VirtualHost>

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