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 {
43
43
#charset koi8-r;
44
44
#access_log /var/log/nginx/host.access.log main;
45
45
46
+ location = / {
47
+ root /usr/share/nginx/html;
48
+ try_files /index .html =404 ;
49
+ }
50
+
46
51
location / {
47
52
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 ;
51
54
}
52
55
53
56
location /api/v1 {
@@ -98,14 +101,9 @@ server {
98
101
99
102
error_page 404 /404 .html;
100
103
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 {
107
105
root /usr/share/nginx/html;
108
- try_files / 404 .html = 404 ;
106
+ internal ;
109
107
}
110
108
111
109
# redirect server error pages to the static page /50x.html
You can’t perform that action at this time.
0 commit comments