Skip to content

Commit

Permalink
update dockerfile and nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
SonOfLope committed Jul 9, 2024
1 parent 2700a81 commit 55f7a0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion wiki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
38 changes: 20 additions & 18 deletions wiki/nginx.conf
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
}

0 comments on commit 55f7a0e

Please sign in to comment.