File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
nginx/filesystem/etc/nginx/conf.d Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,14 @@ server {
4343 #charset koi8-r;
4444 #access_log /var/log/nginx/host.access.log main;
4545
46+ location = / {
47+ root /usr/share/nginx/html;
48+ try_files /index .html =404 ;
49+ }
50+
4651 location / {
4752 root /usr/share/nginx/html;
48- # First attempt to serve request as file, then
49- # as directory, then redirect to index(angular) if no file found.
50- try_files $uri $uri / /index .html;
53+ try_files $uri $uri / =404 ;
5154 }
5255
5356 location /api/v1 {
@@ -98,14 +101,9 @@ server {
98101
99102 error_page 404 /404 .html;
100103
101- location ~ 404 {
102- root /usr/share/nginx/html;
103- try_files /404 .html =404 ;
104- }
105-
106- location ~ 404 .html {
104+ location = /404 .html {
107105 root /usr/share/nginx/html;
108- try_files / 404 .html = 404 ;
106+ internal ;
109107 }
110108
111109 # redirect server error pages to the static page /50x.html
You can’t perform that action at this time.
0 commit comments