Last active
July 14, 2022 14:35
-
-
Save dirtycajunrice/9ea094052980f00d716f17366ac170bf to your computer and use it in GitHub Desktop.
Plex-Apache-Reverse-Proxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requires a2enmod proxy proxy_http proxy_wstunnel rewrite ssl | |
<VirtualHost *:80> | |
ServerName plex.domain.tld | |
ServerAlias plex.domain2.tld | |
Redirect / https://plex.domain.tld | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName plex.domain.tld | |
ServerAlias plex.domain2.tld | |
ServerAdmin nicholas.totsch@gmail.com | |
ProxyRequests Off | |
ProxyPreserveHost On | |
ProxyPass / http://127.0.0.1:32400/ | |
ProxyPassReverse / http://127.0.0.1:32400/ | |
ProxyPass /:/websockets/notifications wss://127.0.0.1:32400/:/websockets/notifications | |
ProxyPassReverse /:/websockets/notifications wss://127.0.0.1:32400/:/websockets/notifications | |
RewriteCond %{HTTP_HOST} !^plex\.domain\.tld$ [NC] | |
RewriteRule ^/$ http://%{HTTP_HOST}/ [L,R=301] | |
ErrorLog ${APACHE_LOG_DIR}/plex.error.log | |
CustomLog ${APACHE_LOG_DIR}/plex.access.log combined | |
SSLCertificateFile /var/www/ssl_keys/mycert.crt | |
SSLCertificateKeyFile /var/www/ssl_keys/mykey.key | |
SSLCertificateChainFile /var/www/ssl_keys/intermediate.crt | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment