Skip to content

Commit

Permalink
refactor(nginx): change location of custom error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dchiller committed Jun 14, 2024
1 parent 6266757 commit 96f5a7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 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 /;
}
}
2 changes: 1 addition & 1 deletion nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ 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 error_pages /error_pages
COPY password/.htpasswd /etc/nginx/.htpasswd

0 comments on commit 96f5a7f

Please sign in to comment.