Help to remove basic auth from Plex on a subdomain

authentication
plex

#1

I am successfully running plex on a subdomain with letsencrypt, but I can’t seem to wrap my head around how to disable basic auth on plex.domain.com

I don’t really see the need for basic auth here, but then again I’m no expert so feel free to tell me otherwise.

This is the plex.conf I’m currently using: (I had to # out every Header lines to make apache start up)
It’s taken from this thread: Lets Encrypt Plex Not Found via domain

ServerSignature Off
ServerTokens Prod

<VirtualHost *:80>
  ServerName plex.domain.com
  # 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.domain.com
ServerAlias ""
Options -Includes -ExecCGI

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

LimitRequestBody 512000
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/plex.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/plex.domain.com/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://localhost:32400/:/websockets/notifications
ProxyPassReverse wss://localhost: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://localhost:32400
ProxyPassReverse / http://localhost:32400

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

Thank you for making such a great product and keep up all the good work that you do!


#2

I have resolved this by editing plex-le-ssl.conf

Here’s my plex-le-ssl.conf if anyone wants to take a look:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName plex.domain.com

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

ProxyRequests Off

ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://domain.com:32400/
ProxyPassReverse / http://domain.com: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.domain.com
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
SSLCertificateFile /etc/letsencrypt/live/plex.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/plex.domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>