diff --git a/bundles/nginx/files/site_template b/bundles/nginx/files/site_template index 5f3b9c7..304e0fc 100644 --- a/bundles/nginx/files/site_template +++ b/bundles/nginx/files/site_template @@ -72,6 +72,18 @@ server { % endif add_header Permissions-Policy interest-cohort=(); + error_page 404 /not_found.html; + location = /not_found.html { + root /var/www/; + internal; + } + + error_page 500 502 503 504 /error.html; + location = /error.html { + root /var/www/; + internal; + } + % if ssl == 'letsencrypt': location /.well-known/acme-challenge/ { alias /var/lib/dehydrated/acme-challenges/; diff --git a/bundles/nginx/items.py b/bundles/nginx/items.py index 9ecb69d..88852e0 100644 --- a/bundles/nginx/items.py +++ b/bundles/nginx/items.py @@ -65,6 +65,8 @@ files = { '/usr/local/share/icinga/plugins/check_nginx_status': { 'mode': '0755', }, + '/var/www/error.html': {}, + '/var/www/not_found.html': {}, } if node.has_bundle('pacman'): files['/etc/systemd/system/nginx.service.d/bundlewrap.conf'] = { diff --git a/data/nginx/files/error.html b/data/nginx/files/error.html new file mode 100644 index 0000000..544a586 --- /dev/null +++ b/data/nginx/files/error.html @@ -0,0 +1,73 @@ + + + + Server Error + + + + + + +
+
+

Server Error

+
+
+

Dieses System ist aktuell nicht verfügbar.

+

This system is currently unavailable.

+
+
+ + + diff --git a/data/nginx/files/not_found.html b/data/nginx/files/not_found.html new file mode 100644 index 0000000..289b13b --- /dev/null +++ b/data/nginx/files/not_found.html @@ -0,0 +1,73 @@ + + + + Not Found + + + + + + +
+
+

🔦 Not Found

+
+
+

404 - Seite nicht gefunden.

+

404 - Page not found.

+
+
+ + +