From 84270348760677b86779f99d9fcefd1d1f29d54a Mon Sep 17 00:00:00 2001 From: cghislai Date: Mon, 15 Feb 2021 03:49:17 +0100 Subject: [PATCH] Fix --- Dockerfile | 5 ++++- docker/httpd.conf | 9 +++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 21e4b67..d920493 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ FROM docker.charlyghislain.com/front-apache:2.4.39-a ARG CLANG=en -ADD docker/httpd.conf /var/run/httpd/charlyghislaindotcom.conf ADD dist/${CLANG} /var/www/ +ADD docker/httpd.conf /var/run/httpd.conf.tmp +RUN apk add gettext \ + && mkdir /var/run/httpd \ + && cat /var/run/httpd.conf.tmp | envsubst > /var/run/httpd/charlyghislaindotcom.conf ENV LANG=$CLANG HEALTHCHECK --interval=10s --timeout=3s \ diff --git a/docker/httpd.conf b/docker/httpd.conf index b70a31d..1c5d597 100644 --- a/docker/httpd.conf +++ b/docker/httpd.conf @@ -13,14 +13,11 @@ DocumentRoot /var/www RewriteRule ^ - [L] # If for an existing subpath, redirect to index - RewriteCond %{REQUEST_URI} "^/en/" - RewriteRule ^ /en/index.html [L] - - RewriteCond %{REQUEST_URI} "^/fr/" - RewriteRule ^ /fr/index.html [L] + RewriteCond %{REQUEST_URI} "^/${CLANG}/" + RewriteRule ^ /${CLANG}/index.html [L] # If the requested resource doesn't exist, use index.html - RewriteRule ^ /fr/ [L,R] + RewriteRule ^ /${CLANG}/ [L,R]