diff --git a/config/nginx/conf.d/cantusdb.conf.development b/config/nginx/conf.d/cantusdb.conf.development index 972c91519..25ec86df2 100644 --- a/config/nginx/conf.d/cantusdb.conf.development +++ b/config/nginx/conf.d/cantusdb.conf.development @@ -10,6 +10,7 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_redirect off; + proxy_intercept_errors on; } location /static { @@ -24,17 +25,10 @@ server { expires modified +24h; } - error_page 500 /500.html; - location = /500.html { - root /; - } - - error_page 502 /502.html; - location = /502.html { - root /; - } - error_page 504 /504.html; - location = /504.html { + error_page 500 /error_pages/500.html; + error_page 502 /error_pages/502.html; + error_page 504 /error_pages/504.html; + location /error_pages { root /; } } diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 080a18815..fa8b1fdb6 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -6,5 +6,4 @@ RUN curl -LJO https://github.com/go-acme/lego/releases/download/v4.14.2/lego_v4. mv lego /usr/local/bin/lego && \ rm lego_v4.14.2_linux_amd64.tar.gz RUN mkdir -p /var/www/lego -COPY error_pages . -COPY password/.htpasswd /etc/nginx/.htpasswd \ No newline at end of file +COPY error_pages /error_pages \ No newline at end of file diff --git a/nginx/password/.htpasswd b/nginx/password/.htpasswd deleted file mode 100644 index 4453f326c..000000000 --- a/nginx/password/.htpasswd +++ /dev/null @@ -1 +0,0 @@ -# Note: This file is intentionally empty for development and production environments. It will be replaced with a file containing a hashed password on the staging server by ansible. \ No newline at end of file