From 1b63332872c2af85131b1a70d9f170f596fe0338 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 13 Sep 2023 10:06:12 -0500 Subject: [PATCH] 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. --- roles/jellyfin/templates/jellyfin.httpd.conf.j2 | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/jellyfin/templates/jellyfin.httpd.conf.j2 b/roles/jellyfin/templates/jellyfin.httpd.conf.j2 index af6cb97..620eb1f 100644 --- a/roles/jellyfin/templates/jellyfin.httpd.conf.j2 +++ b/roles/jellyfin/templates/jellyfin.httpd.conf.j2 @@ -3,6 +3,7 @@ RewriteEngine On RewriteCond %{HTTPS} !on + RewriteCond %{SERVER_NAME} {{ jellyfin_server_name }} RewriteRule /.* https://%{SERVER_NAME}$0 [R=301,L]