Skip to content
Snippets Groups Projects
Commit 5fa7218b authored by Alessandro Cerioni's avatar Alessandro Cerioni
Browse files

Fixed nginx configuration, which wasn't working for <base_url>/fr and <base_url>/en.

parent e6109bee
No related branches found
No related tags found
No related merge requests found
server {
# staging server is listening on the port 8080
listen 8080;
server_name portail-data;
server_name _;
root /usr/share/nginx/html/;
# rule redirecting to fr or en regarding the browser preferences
# rule redirecting to fr or en regarding the browser preferences
location = / {
rewrite_by_lua '
for lang in (ngx.var.http_accept_language .. ","):gmatch("([^,]*),") do
......@@ -20,12 +20,12 @@ server {
}
# This is needed to allow reloading in the app when not on the base url as our app is an SPA
location /en/ {
try_files $uri$args $uri/ /en/index.html;
location /en {
try_files $uri$args /en/index.html;
}
location /fr/ {
try_files $uri$args $uri/ /fr/index.html;
location /fr {
try_files $uri$args /fr/index.html;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment