From aee388cd4088ff88437a200825ee1715f9557634 Mon Sep 17 00:00:00 2001
From: Remi  PLANEL <rplanel@pasteur.fr>
Date: Wed, 20 Sep 2023 11:37:39 +0200
Subject: [PATCH] root /etc/nginx/html

---
 Dockerfile |  2 +-
 nginx.conf | 21 +++++++--------------
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 81f055e6..ff973a26 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -49,5 +49,5 @@ RUN npm run generate
 FROM nginxinc/nginx-unprivileged:1.25
 # RUN rm -rf /usr/share/nginx/html/*
 COPY nginx.conf /etc/nginx/conf.d/default.conf
-COPY --from=generate /usr/src/app/.output/public /usr/share/nginx/html
+COPY --from=generate /usr/src/app/.output/public /etc/nginx/html
 CMD ["nginx", "-g", "daemon off;"]
\ No newline at end of file
diff --git a/nginx.conf b/nginx.conf
index b0a06333..ac99c650 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -2,21 +2,14 @@ server_tokens off;
 server {
     listen 8080;
     server_name localhost;
-    location ^~/wiki {
-        root /usr/share/nginx/html;
+    location ^~/wiki/ {
+        alias /etc/nginx/html/;
         index index.html index.htm;
-        try_files $uri /index.html;
-        proxy_set_header Host $host;
-        proxy_set_header X-Real-IP $remote_addr;
-        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-        proxy_set_header X-NginX-Proxy true;
-        # rewrite ^/wiki/(.*)$ /$1 break;
-        proxy_pass http://wiki/;
-    }
 
-    # error_page 500 502 503 504 /50x.html;
-    # location = /50x.html {
-    #     root /usr/share/nginx/html;
-    # }
+    }
+    error_page 500 502 503 504 /50x.html;
+    location = /50x.html {
+        alias /etc/nginx/html/;
+    }
 
 }
\ No newline at end of file
-- 
GitLab