error_page 404 /errors/html/$lang/404.html;
error_page 403 /errors/html/$lang/forbidden.html;
error_page 500 502 503 504 /errors/html/$lang/50x.html;
location /errors/ {
alias /var/www/errors/;
allow all;
internal; # Only Intrenal Errors can use this
}
location ~ ^/error_images/.*\.(jpg|jpeg|png|gif)$ {
root /var/www/errors/;
expires 30d; # Cache the image for 30 days
autoindex off;
# access_log /var/log/nginx/404_errors_access.log;
}