Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
Nginx default error page is still showing

I added custom error page to Nginx by these lines:

error_page 400 /custom.html;
location = /custom.html {
  root /somewhere/html;
  internal;
}

location /test {
  return 400;
}

It returns my custom error page for test location; The problem is for some requests like when request header is too large, It still returns the default error page of Nginx.

<html>
  <head><title>400 Request Header Or Cookie Too Large</title></head>
  <body>
  <center><h1>400 Bad Request</h1></center>
  <center>Request Header Or Cookie Too Large</center>
  <hr><center>nginx</center>
  </body>
</html>

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Apparently this specific error uses code 494 internally.

You can try with

error_page 494 =400 /custom.html

I found that on the nginx mailing list:

Try handling 494 errors instead. It's a custom code used to report "Request Header Too Large" errors, translated to 400 just before returning to client. It was introduced in nginx 0.9.4 to make it possible to define a custom error page for these particular errors separately from generic 400 errors.

https://mailman.nginx.org/pipermail/nginx/2018-June/056342.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!