How to Serve Custom Error Pages (404, 500, 502, 503) in Nginx & OpenLiteSpeed
Quick Technical Answer: To serve branded custom error pages in Nginx: Place standalone HTML files in /var/www/html/errors/. Inside your server {} block, declare error_page 404 /errors/404.html; and error_page 500 502 503 504 /errors/50x.html;. Add a protected location block with internal; (e.g. location ^~ /errors/ { root /var/www/html; internal; }). This ensures that even if your … Read more
