From 92c174491c79ade07afb55134a88ca282b635687 Mon Sep 17 00:00:00 2001 From: Jewgeni Lewash Date: Sat, 2 Mar 2024 20:58:32 +0100 Subject: [PATCH] feat(nginx): update custom nginx conf --- nginx/nginx.conf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index f35877a..9343736 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -32,13 +32,12 @@ http { listen 80; listen [::]:80; server_name localhost; + port_in_redirect off; - location / { - root /usr/share/nginx/html; - index index.html index.htm; - } - - try_files $uri $uri/ /index.html; + root /usr/share/nginx/html; + index index.html index.htm; + rewrite ^([^.]*[^/])$ $1/ permanent; + try_files $uri $uri/ $uri/index.html =404; location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ { expires 30d;