From 1efd997013bc267f81249d48924857c412a0a227 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Tue, 23 May 2017 04:21:27 +0000 Subject: [PATCH] add static rewrite rules to all the virtual hosts --- .../upstreamfirst-frontend/templates/0_pagure.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/pagure/upstreamfirst-frontend/templates/0_pagure.conf b/roles/pagure/upstreamfirst-frontend/templates/0_pagure.conf index 2b1f1bf688..5398bb1271 100644 --- a/roles/pagure/upstreamfirst-frontend/templates/0_pagure.conf +++ b/roles/pagure/upstreamfirst-frontend/templates/0_pagure.conf @@ -78,6 +78,16 @@ WSGIDaemonProcess paguredocs user=git group=git maximum-requests=1000 display-na git-(upload|receive)-pack))$" \ /usr/libexec/git-core/git-http-backend/$1 + # Configure static files so that a custom theme can override the defaults + + RewriteCond "{{ pagure_theme_static_dir }}/$1" -f + RewriteRule "^/static/(.*)" "{{ pagure_theme_static_dir }}/$1" [L] + + # Use the application default theme for files not customized + + RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L] + + WSGIProcessGroup pagure