diff options
-rw-r--r-- | roles/distgit/templates/lookaside-upload.conf | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/distgit/templates/lookaside-upload.conf b/roles/distgit/templates/lookaside-upload.conf index fcfff76c5..eab5f169f 100644 --- a/roles/distgit/templates/lookaside-upload.conf +++ b/roles/distgit/templates/lookaside-upload.conf @@ -66,5 +66,20 @@ SSLCryptoDevice builtin Require valid-user </Location> + + # Insert the redirect rules allowing pagure to override some of its static + # files. This is pagure related not so much lookaside related but since this + # is using a VirtualHost on port 80 we need to group the configs + + # Configure static files so that a custom theme can override the defaults + RewriteEngine on + + # Check if the static file exists in the template directory + RewriteCond "/usr/share/pagure_dist_git/static/$1" -f + # If it does, use it + RewriteRule "^/static/(.*)" "/usr/share/pagure_dist_git/static/$1" [L] + # Otherwise back out and use the default static folder/theme + RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L] + </VirtualHost> |