Nginx customize error page
If you want to customize error page, here is how:
Create /home/wwwroot/frequent_used/404.html and /home/wwwroot/frequent_used/403.html, add following code into your nginx config file. And nginx -s reload or systemctl restart nginx.
error_page 404 = /404.html;
error_page 403 = /403.html;
location = /404.html {
root /home/wwwroot/frequent_used;
internal;
allow all;
}
location = /403.html {
root /home/wwwroot/frequent_used;
internal;
allow all;
}
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
FLY2X