Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Absolute path for error_page in nginx?

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.

like image 468
Steffan Donal Avatar asked Feb 25 '13 23:02

Steffan Donal


1 Answers

Sure you can but in an indirect way:

error_page 500 /500.html;
location = /500.html {
       root   /usr/var/nginx/errors;
       allow all;
       internal;
}

see http://wiki.nginx.org/HttpCoreModule#error_page

like image 97
number5 Avatar answered Sep 27 '22 22:09

number5