From 1956cc7a6332db277b4294be90f0ed5eeefc1527 Mon Sep 17 00:00:00 2001 From: paspo Date: Sat, 13 Jul 2024 18:04:38 +0200 Subject: [PATCH 1/2] pagine 404 localizzate --- layouts/404.en.html | 11 +++++++++++ layouts/404.it.html | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 layouts/404.en.html create mode 100644 layouts/404.it.html diff --git a/layouts/404.en.html b/layouts/404.en.html new file mode 100644 index 0000000..39b43b6 --- /dev/null +++ b/layouts/404.en.html @@ -0,0 +1,11 @@ +{{ define "main" }} +

Content not found

+

The page you're looking for doesn't exist.

+

If you think this is an error, let us know. + And in full open-source spirit, you can also help up fix it!

+

+ + Go back to home + +

+{{ end }} diff --git a/layouts/404.it.html b/layouts/404.it.html new file mode 100644 index 0000000..6f78e9a --- /dev/null +++ b/layouts/404.it.html @@ -0,0 +1,11 @@ +{{ define "main" }} +

Contenuto non trovato

+

La pagina che stai cercano non esiste.

+

Se pensi che questo sia un errore, faccelo sapere. +E in pieno spirito open-source, puoi anche aiutarci a sistemare!

+

+ + Torna alla home + +

+{{ end }} -- 2.45.2 From 3fa3dc2b87f840175a96990f4d44cefeedc4d9b6 Mon Sep 17 00:00:00 2001 From: paspo Date: Sat, 13 Jul 2024 18:14:05 +0200 Subject: [PATCH 2/2] 404 config webserver --- docker/rootfs/etc/nginx/http.d/default.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docker/rootfs/etc/nginx/http.d/default.conf b/docker/rootfs/etc/nginx/http.d/default.conf index d1c49d7..77eb2be 100644 --- a/docker/rootfs/etc/nginx/http.d/default.conf +++ b/docker/rootfs/etc/nginx/http.d/default.conf @@ -12,9 +12,14 @@ server { rewrite ^/feed/.*$ /index.xml last; } - location = /404.html { - internal; + location ~ ^/it/.* { + error_page 404 /it/404.html; } + + location ~ ^/en/.* { + error_page 404 /en/404.html; + } + } gzip on; -- 2.45.2