Is there a way I can set an absolute path for nginx error_pages? Not absolute as in http://
, but absolute as in /usr/var/nginx/errors/500.html
.
Asked
Active
Viewed 8,108 times
9

Steffan Donal
- 2,244
- 4
- 24
- 47
1 Answers
17
Sure you can but in an indirect way:
error_page 500 /500.html;
location = /500.html {
root /usr/var/nginx/errors;
allow all;
internal;
}

number5
- 15,913
- 3
- 54
- 51
-
@magu [official docs](http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page) says it works in `http` context too. What version of nginx you are using? – number5 May 28 '15 at 04:56