Skip to content

Commit

Permalink
last try at removing port redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Jul 9, 2024
1 parent cc093e2 commit 40d8af0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wiki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN mkdocs build -f mkdocs-fr.yml -d site/fr

RUN mkdocs build -f mkdocs-en.yml -d site/en

FROM ghcr.io/nginxinc/nginx-unprivileged:stable-alpine
FROM ghcr.io/nginxinc/nginx-unprivileged:stable-bookworm-perl

COPY --from=builder /app/site/fr /usr/share/nginx/html/
COPY --from=builder /app/site/en /usr/share/nginx/html/en/
Expand Down
7 changes: 6 additions & 1 deletion wiki/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,22 @@ http {
server {
listen 8080;
server_name _;

absolute_redirect off;

location / {
alias /usr/share/nginx/html/fr/;
try_files $uri $uri/ /fr/index.html;
error_page 404 /404.html;
}

location /en/ {
alias /usr/share/nginx/html/en/;
try_files $uri $uri/ /en/index.html;
error_page 404 /en/404.html;
}

location ~ ^(.+)/$ { return 301 $scheme://$http_host$1; }

error_page 404 /404.html;
}
}

0 comments on commit 40d8af0

Please sign in to comment.