Add error-pages role

This commit is contained in:
Alexander Dietrich 2020-04-08 22:49:09 +02:00
commit 6aa994b056
7 changed files with 48 additions and 16 deletions

View file

@ -0,0 +1,5 @@
error_page 502 /_error-pages/502.html;
location ^~ /_error-pages {
root /var/www;
}

View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bad Gateway</title>
<link rel="stylesheet" href="/_error-pages/style.css">
</head>
<body>
<img src="/_error-pages/bad_gateway.png" alt="Bad Gateway Traffic Sign">
</body>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View file

@ -0,0 +1,10 @@
body {
display: flex;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
align-items: center;
justify-content: center;
background: white;
}

View file

@ -0,0 +1,15 @@
---
- name: create directory
file:
path: /var/www/_error-pages
state: directory
- name: copy error-pages
copy:
src: error-pages/
dest: /var/www/_error-pages/
- name: copy error-pages.conf
copy:
src: error-pages.conf
dest: /etc/nginx/snippets/