risposta

14

sicuro che si può, ma in modo indiretto:

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

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

+3

prega di notare questo non funzionerà all'interno 'http' blocchi. –

+0

@magu [documenti ufficiali] (http://nginx.org/en/docs/http/ngx_http_core_module.html#error_page) dice che funziona anche nel contesto di 'http'. Quale versione di nginx stai usando? – number5

+4

'error_page' funziona. 'location' no. –

Problemi correlati