DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

Change custom error page location & remove htpasswd placeholder #1530

Closed dchiller closed 1 month ago

dchiller commented 1 month ago

This PR fixes features that were added in #1520.

1520 added a placeholder password file (nginx/password/.htpasswd) that was then overwritten on the staging server by ansible. This meant that subsequent deployments with ansible on the staging server would fail because a subsequent git pull would find changes to the local working directory. This PR removes that placeholder .htpasswd file.

This PR also refactors the custom error pages served by nginx to make the nginx configuration file simpler.

Finally, the custom error page was not showing when gunicorn returned a 500 error. Turning the proxy_intercept_errors configuration "on" means that nginx now intercepts this error from gunicorn and serves the custom 500 error page.

Fixes #1519. Refs https://github.com/dact-chant/ansible.cantus-db/issues/41.