Улучшен конфиг для 404
This commit is contained in:
parent
daae31c044
commit
98c519a17f
@ -23,18 +23,17 @@ server {
|
|||||||
ssl_dhparam {{ vars[homepage_name + "_ssl_dhparam"] }};
|
ssl_dhparam {{ vars[homepage_name + "_ssl_dhparam"] }};
|
||||||
ssl_prefer_server_ciphers on;
|
ssl_prefer_server_ciphers on;
|
||||||
|
|
||||||
|
root {{ homepage_dir }}/current;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
error_page 404 = @notfound;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root {{ homepage_dir }}/current;
|
|
||||||
index index.html;
|
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 404 /404/;
|
location @notfound {
|
||||||
|
try_files /404/index.html =409;
|
||||||
location = /404/ {
|
|
||||||
root {{ homepage_dir }}/current;
|
|
||||||
index index.html;
|
|
||||||
try_files $uri $uri/ =409;
|
|
||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user