r/jellyfin: Restrict HTTPS redirect to Jellyfin

Since Jellyfin is running on the file server, which also hosts a few
other websites that do not define virtual hosts, the HTTP-to-HTTPS
redirect was applied to *all* requests.  To avoid this, we simply add a
rewrite condition so that the redirect only applies to requests for
Jellyfin.
step-ssh
Dustin 2023-09-13 10:06:12 -05:00
parent a2b3f9b5b9
commit 1b63332872
1 changed files with 1 additions and 0 deletions

View File

@ -3,6 +3,7 @@
RewriteEngine On RewriteEngine On
RewriteCond %{HTTPS} !on RewriteCond %{HTTPS} !on
RewriteCond %{SERVER_NAME} {{ jellyfin_server_name }}
RewriteRule /.* https://%{SERVER_NAME}$0 [R=301,L] RewriteRule /.* https://%{SERVER_NAME}$0 [R=301,L]
</VirtualHost> </VirtualHost>