Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

168
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda