From 55f7a0e99280c1485cea6fac63c0d02811c7f208 Mon Sep 17 00:00:00 2001 From: Jlopez Date: Tue, 9 Jul 2024 13:06:50 -0400 Subject: [PATCH] update dockerfile and nginx.conf --- wiki/Dockerfile | 2 +- wiki/nginx.conf | 38 ++++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/wiki/Dockerfile b/wiki/Dockerfile index 9798cb3..5c9814e 100644 --- a/wiki/Dockerfile +++ b/wiki/Dockerfile @@ -14,6 +14,6 @@ FROM nginx:alpine COPY --from=builder /app/site/ /usr/share/nginx/html/ -COPY wiki/nginx.conf /etc/nginx/conf.d/default.conf +COPY wiki/nginx.conf /etc/nginx/nginx.conf EXPOSE 8000 diff --git a/wiki/nginx.conf b/wiki/nginx.conf index 43a1eb6..bbfaf0d 100644 --- a/wiki/nginx.conf +++ b/wiki/nginx.conf @@ -1,23 +1,25 @@ -server { - listen 8000; - server_name localhost; +http { + server { + listen 8000; + server_name localhost; - location / { - return 301 /fr; - } + location / { + return 301 /fr; + } - location /fr { - alias /usr/share/nginx/html/fr; - try_files $uri $uri/ /fr/index.html; - } + location /fr { + alias /usr/share/nginx/html/fr; + try_files $uri $uri/ /fr/index.html; + } - location /en { - alias /usr/share/nginx/html/en; - try_files $uri $uri/ /en/index.html; - } + location /en { + alias /usr/share/nginx/html/en; + try_files $uri $uri/ /en/index.html; + } - error_page 404 /404.html; - location = /404.html { - internal; + error_page 404 /404.html; + location = /404.html { + internal; + } } -} +} \ No newline at end of file