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.
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 subsequentgit 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.