#194 Allow Pagure to handle static assets
Merged 3 years ago by pingou. Opened 3 years ago by ngompa.
fedora-infra/ ngompa/ansible pagure-5.11-cleanups  into  master

@@ -90,18 +90,6 @@ 

    SSLCertificateChainFile /etc/pki/tls/certs/pagure.io.intermediate.cert

    SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key

  

- {% if env == 'pagure-staging' %}

-   Alias /static /usr/lib/python3.6/site-packages/pagure/static/

- {% else %}

-   Alias /static /usr/lib/python2.7/site-packages/pagure/static/

- {% endif %}

- 

-   <Location "/static/vendor/emojione/emojione.sprites.png">

-     ExpiresActive On

-     ExpiresDefault "access plus 1 week"

-     Header append Cache-Control "public"

-   </Location>

- 

    SetEnv GIT_PROJECT_ROOT /srv/git/repositories

  

    <Location />
@@ -188,8 +176,6 @@ 

    SSLCertificateKeyFile /etc/pki/tls/certs/pagure.io.key

  {% endif %}

  

-   Alias /static /usr/lib/python2.7/site-packages/pagure/static/

- 

    # redirects for sssd docs. 

    # https://pagure.io/fedora-infrastructure/issue/8995

    RedirectMatch ^/SSSD.sssd$             https://sssd.io
@@ -197,12 +183,6 @@ 

    RedirectMatch ^/SSSD.sssd/index.html   https://sssd.io/index.html

    RedirectMatch ^/SSSD.sssd/(.*)         https://sssd.io/docs/$1

  

-   <Location "/static/vendor/emojione/emojione.sprites.png">

-     ExpiresActive On

-     ExpiresDefault "access plus 1 week"

-     Header append Cache-Control "public"

-   </Location>

- 

    <Location />

      WSGIProcessGroup paguredocs

      <IfModule mod_authz_core.c>

With the version 5.11 release (technically we've had this with 5.10.0-11 in production), Pagure can handle serving static assets itself. This PR removes the unnecessary settings from the Apache HTTPD configuration to allow Pagure to do it instead.

rebased onto 59cf747

3 years ago

I'll give this a try in stg first :)

Pull-Request has been merged by pingou

3 years ago