ServerSignature Off ServerTokens Prod ServerName plex.website.com # This VirtualHost redirects everything to HTTPS on port 443. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} ServerName plex.website.com ServerAlias "" Options -Includes -ExecCGI RewriteEngine On RewriteCond %{THE_REQUEST} !HTTP/1.1$ RewriteRule .* - [F] LimitRequestBody 512000 SSLEngine On SSLCertificateFile /etc/apache2/ssl/cert.pem SSLCertificateKeyFile /etc/apache2/ssl/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 ProxyPass wss://plex:32400/:/websockets/notifications #plex here is resolved to my plex container ProxyPassReverse wss://plex:32400/:/websockets/notifications #plex here is resolved to my plex container Order deny,allow Allow from all ProxyRequests Off ProxyPreserveHost On SSLProxyEngine On RequestHeader set Front-End-Https "On" ProxyPass / http://plex:32400/ #plex here is resolved to my plex container ProxyPassReverse / http://plex:32400/ #plex here is resolved to my plex container RewriteEngine on RewriteCond %{REQUEST_URI} !^/web RewriteCond %{HTTP:X-Plex-Device} ^$ RewriteCond %{REQUEST_METHOD} !^(OPTIONS)$ RewriteRule ^/$ /web/$1 [R,L]