2
votes
1answer
111 views

Setting up custom error pages for nginx with https and virtual hosts

We have an nginx (OpenResty 1.4.2.7) instance acting as a load balancer. It has two server directives, one to serve one specific site (let's call it www.our-special-host.com) and one wildcard for ...
2
votes
0answers
573 views

Why does Nginx's proxy_intercept_errors directive require a rewrite to work properly?

Following is a sample Nginx server configuration. Without the "magical talisman" location block, proxied error content results in an Nginx 404 page rather than the customized error page being served. ...
0
votes
2answers
273 views

separate logs from limit_req_zone in nginx

Here we have piece of current nginx configuration: limit_req_zone $binary_remote_addr zone=one:32m rate=2r/s; limit_req zone=one burst=10; error_page 500 501 502 503 504 =503 /offline.html; location ...
0
votes
2answers
197 views

nginx won't serve an error_page in a subdirectory of the document root

Here's a snippet of my nginx configuration: server { error_page 500 /errors/500.html; } When I cause a 500 in my application, Chrome just shows its default 500 page (Firefox and Safari show a ...
0
votes
1answer
573 views

custom 502 bad gataway for nginx, cannot get it to work, whats wrong?

Im trying to catch a 502 bad gataway for nginx with unicorn. This error is thrown when unicorn is not running. Im trying to use a custom error page instead for when unicorn is not running to no avail. ...
1
vote
1answer
584 views

nginx: error_page does not work

I try to set up a maintenance page for my rails app, using this snipplet. error_page 503 /system/maintenance.html; if (-f $document_root/system/maintenance.html) { return 503; } This works as far ...
2
votes
1answer
2k views

nginx custom 404 error page for virtual host

I'm running a few virtual hosts off nginx, and I would like them to each have their own custom 404 pages. Each virtual host has their own nginx.conf that I include my global nginx.conf. Inside the ...
3
votes
1answer
2k views

nginx: error_page directive is silently ignored

I'm trying to return a custom 400 error page for non-HTTPS requests in nginx. I'm new to nginx, but I've read many pages of examples on custom error pages and nothing seems to work for me. My config: ...