From c4dcb7cd40652a49c4eec3d65173eb7e54f49651 Mon Sep 17 00:00:00 2001 From: Bob Vandevliet Date: Fri, 14 Feb 2025 11:56:40 +0100 Subject: [PATCH] Improved nginx config and enable for sub-pages. --- .volumes/nginx/conf/conf.d/default.conf | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.volumes/nginx/conf/conf.d/default.conf b/.volumes/nginx/conf/conf.d/default.conf index 7ce585b..b618f7c 100644 --- a/.volumes/nginx/conf/conf.d/default.conf +++ b/.volumes/nginx/conf/conf.d/default.conf @@ -9,14 +9,20 @@ server { location / { index index.html; - try_files $uri $uri/ $uri.html =404; ssi on; + try_files $uri $uri.html $uri/ /pages$uri /pages$uri.html =404; } - location /includes/ { - try_files $uri $uri/ $uri.html =404; - ssi on; - add_header X-Robots-Tag "noindex, nofollow"; + location /pages/ { + internal; + ssi on; + deny all; + } + + location ^~ /includes/ { + internal; + ssi on; + deny all; } error_page 404 /404.html;