Compare commits
1 Commits
main
...
feature/er
Author | SHA1 | Date | |
---|---|---|---|
d86ea6a382 |
1
coreos-config/compose/01_errorpage/.env
Normal file
1
coreos-config/compose/01_errorpage/.env
Normal file
@ -0,0 +1 @@
|
||||
COMPOSE_PROJECT_NAME=errorpage
|
13
coreos-config/compose/01_errorpage/default.conf
Normal file
13
coreos-config/compose/01_errorpage/default.conf
Normal file
@ -0,0 +1,13 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
error_page 404 /404.html;
|
||||
# other error pages here:
|
||||
# error_page 403 /403.html;
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/error-pages;
|
||||
internal;
|
||||
}
|
||||
}
|
31
coreos-config/compose/01_errorpage/docker-compose.yaml
Normal file
31
coreos-config/compose/01_errorpage/docker-compose.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
version: '3'
|
||||
services:
|
||||
error:
|
||||
image: nginx:latest
|
||||
restart: always
|
||||
volumes:
|
||||
- ./error-pages:/usr/share/nginx/error-pages:ro,Z
|
||||
- ./default.conf:/etc/nginx/conf.d/default.conf:ro,Z
|
||||
networks:
|
||||
# This is the network over which Traefik communicates with other containers.
|
||||
- gateway
|
||||
labels:
|
||||
traefik.enable: true
|
||||
|
||||
traefik.http.routers.error-router.rule: Host(`*.tobiasmanske.de`)
|
||||
traefik.http.routers.error-router.priority: 1
|
||||
traefik.http.routers.error-router.entrypoints: websecure
|
||||
traefik.http.routers.error-router.middlewares: error-pages-middleware
|
||||
|
||||
traefik.http.middlewares.error-pages-middleware.errors.status: 400-599
|
||||
traefik.http.middlewares.error-pages-middleware.errors.service: error-pages-service
|
||||
traefik.http.middlewares.error-pages-middleware.errors.query: /{status}.html
|
||||
|
||||
traefik.http.services.error-pages-service.loadbalancer.server.port: 80
|
||||
com.centurylinklabs.watchtower.scope: update
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
external: true
|
||||
...
|
7
coreos-config/compose/01_errorpage/error-pages/404.html
Normal file
7
coreos-config/compose/01_errorpage/error-pages/404.html
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>404</h1>
|
||||
<p>Page not found</p>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user