Is it possible to define a common location for all servers? From nginx location documentation I've seen that location depends on server. I would like to do something like this:
...
http {
error_page 404 /error/404.html;
error_page 500 501 502 503 504 /error/50x.html;
location ^~ /error/ {
internal;
root /var/www/nginx/errors;
}
server {
...
}
server {
...
}
...
}
I've tried setting:
http {
...
root /var/www/nginx/errors; # also with root /var/www/nginx
...
}
with no success: always showing nginx default error page.