Skip to content

Commit

Permalink
Merge pull request #1530 from dchiller/refactor-error-pgs-and-psswd
Browse files Browse the repository at this point in the history
Change custom error page location & remove htpasswd placeholder
  • Loading branch information
dchiller committed Jun 17, 2024
2 parents e50b82f + 2c4fb30 commit 94e6c57
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
16 changes: 5 additions & 11 deletions config/nginx/conf.d/cantusdb.conf.development
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 /;
}
}
3 changes: 1 addition & 2 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
COPY error_pages /error_pages
1 change: 0 additions & 1 deletion nginx/password/.htpasswd

This file was deleted.

0 comments on commit 94e6c57

Please sign in to comment.