nginx设置错误页

最后更新:2019-05-10

直接上配置


error_page 401 /401.html;
error_page 403 /403.html;
error_page 404 /404.html;
error_page 500 502 503 504 /500.html;
location = /401.html {
	root   /alidata/nginx/content/error;
}
location = /403.html {
	root   /alidata/nginx/content/error;
}
location = /404.html {
	root   /alidata/nginx/content/error;
}
location = /500.html {
	root   /alidata/nginx/content/error;
}
Edgar

Edgar
一个略懂Java的小菜比