Custom error

This commit is contained in:
Roberto Alsina 2022-06-27 17:18:19 -03:00
parent a322a27b57
commit 145228b4b6
3 changed files with 16 additions and 1 deletions

View File

@ -20,8 +20,9 @@ RUN apk update && apk add --no-cache ca-certificates iptables ip6tables nginx
COPY --from=builder /app/start.sh /app/start.sh
COPY --from=tailscale /app/tailscaled /app/tailscaled
COPY --from=tailscale /app/tailscale /app/tailscale
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale /usr/share/nginx/html
COPY nginx.conf /etc/nginx/http.d/nginx.conf
COPY custom_50x.html /usr/share/nginx/html/
# Run on container startup.
EXPOSE 8080

4
custom_50x.html Normal file
View File

@ -0,0 +1,4 @@
<center>
<marquee>We seem to be having some technical difficulties. Hang tight.</marquee>
<img src="https://64.media.tumblr.com/835be7a6a0f8bd9422190520597061dc/tumblr_nqaedpjO5Z1tszwcio1_540.jpg" style"width:100%;">
</center>

View File

@ -8,6 +8,11 @@ server {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:8080;
proxy_set_header X-Forwarded-Host $http_host;
}
error_page 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/html;
internal;
}
}
server {
@ -21,4 +26,9 @@ server {
proxy_pass http://pinky.ralsina.github.beta.tailscale.net:3000;
proxy_set_header X-Forwarded-Host $http_host;
}
error_page 403 404 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /usr/share/nginx/html;
internal;
}
}