Nginx redirect to main page on 404 errors

This commit is contained in:
Juan Ferrer 2019-02-01 09:37:20 +01:00
parent e63e4319cd
commit 13ec9006a9
1 changed files with 1 additions and 0 deletions

View File

@ -6,6 +6,7 @@ server {
autoindex off; autoindex off;
root /usr/share/nginx/html; root /usr/share/nginx/html;
error_page 404 =302 /;
location ~ ^(/[a-zA-Z0-9_-]+)?/(?<path>api(/.*)?)$ { location ~ ^(/[a-zA-Z0-9_-]+)?/(?<path>api(/.*)?)$ {
resolver 127.0.0.11; resolver 127.0.0.11;