armsultan
7/13/2017 - 9:58 PM

NGINX - Custom Error pages

A Configuration to point to custom error pages

server {

# ... other configurations

# Path for static files
  root html/Shoppe-static;

  # Custom Error Pages (These pages do not depend on any local css,images,js etc )
  error_page 403 /error/403.html;
  error_page 404 /error/404.html;
  error_page 500 /error/500.html;
  error_page 503 /error/503.html;
  error_page 504 /error/504.html;

  # External clients cannot request these error pages only nginx can...
  location ^~ /error/ {
      internal;
  }
  
  
# ... other configurations

}