From fa724c066b7d6fbda238d2c26ef41baada78ad6a Mon Sep 17 00:00:00 2001 From: FireToak Date: Sun, 16 Aug 2026 20:22:44 +0200 Subject: [PATCH] fix(nginx): correction erreur redirection --- Dockerfile | 2 +- docker-compose.yml | 24 ++++++++++++------------ nginx.conf | 15 +++++---------- src/components/AccueilLoutik.astro | 9 ++++++++- src/components/Footer.astro | 10 ++++++++++ src/components/SiteTitle.astro | 2 +- 6 files changed, 37 insertions(+), 25 deletions(-) diff --git a/Dockerfile b/Dockerfile index e8ac748..f92b4e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,4 +8,4 @@ RUN touch /var/run/nginx.pid && \ USER 101 -EXPOSE 8080 \ No newline at end of file +EXPOSE 80 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c37a8d6..4814dd2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,24 +8,24 @@ services: # image: nginx:1.31.3-alpine-slim # container_name: dev-loutikdocs # ports: - # - 8080:80 + # - 80:80 # volumes: - # - ./dist:/usr/share/nginx/html + # - ./dist:/usr/share/nginx/html # ================================== # Dev view # ================================== - # nginx: - # image: dev-loutikdocs:1.0.3 - # container_name: dev-loutikdocs - # ports: - # - 8080:8080 + nginx: + image: dev-loutikdocs:1.0.8 + container_name: dev-loutikdocs + ports: + - 8080:80 # =================================== # Prod view # =================================== - nginx: - image: ghcr.io/loutik/website-docs:latest - container_name: prd-loutikdocs - ports: - - 8080:8080 \ No newline at end of file + # nginx: + # image: ghcr.io/loutik/website-docs:latest + # container_name: prd-loutikdocs + # ports: + # - 8080:8080 \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 9ce214a..3d7809c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,6 +1,6 @@ server { - listen 8080; - listen [::]:8080; + listen 80; + listen [::]:80; server_name _; # Répertoire des fichiers html @@ -10,6 +10,9 @@ server { # Masque de la version de NGINX server_tokens off; + # Empêche les redirections sur les pots + absolute_redirect off; + # Redirection favicon location = /favicon.ico { try_files /favicon.ico =404; @@ -17,11 +20,6 @@ server { access_log off; } - # Redirection index - if ($request_uri ~ "^/index(\.html)?$") { - return 301 /; - } - # Masque des extensions .html location / { try_files $uri $uri.html $uri/ =404; @@ -33,7 +31,4 @@ server { location = /404.html { internal; } - - # Trailing Slash - Désactivé - #rewrite ^/(.*)/$ /$1 permanent; } \ No newline at end of file diff --git a/src/components/AccueilLoutik.astro b/src/components/AccueilLoutik.astro index 37cfe16..44c2bf3 100644 --- a/src/components/AccueilLoutik.astro +++ b/src/components/AccueilLoutik.astro @@ -1,5 +1,5 @@ --- -// test +// AccueilLoutik ---
@@ -32,6 +32,13 @@
+ + +