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

165
Visualizações
Nginx can't handle files 10+ mb file upload

I have a production and nonproduction environment both with the same YAML configuration

In the production environment, uploading a file over around 10+- mb results in a 403 error generated by nginx. Anything under will result in a successful file upload

whilst in the non prod environment, we are able to upload files that follow the limit given by our config, up to 1gb

below is a snippet of the important annotations being added

    nginx.ingress.kubernetes.io/client-body-buffer-size: 1000m
    nginx.ingress.kubernetes.io/client-max-body-size: 1000m
    nginx.ingress.kubernetes.io/fastcgi-read-timeout: "600"
    nginx.ingress.kubernetes.io/fastcgi-send-timeout: "600"
    nginx.ingress.kubernetes.io/idle-timeout: 600s
    nginx.ingress.kubernetes.io/modsecurity-snippet: SecRuleRemoveByID 949110
    nginx.ingress.kubernetes.io/proxy-body-size: 1000m
    nginx.ingress.kubernetes.io/proxy-connect-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-next-upstream-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    nginx.ingress.kubernetes.io/rewrite-target: /$1```
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

By default you can upload only 1 MB in Nginx and if you upload more than that it will throw some error. If you want to increase size the across the site please add below line client_max_body_size 50M If you want to limit only for HTTPS requests but not HTTP requests you need to add client_max_body_size 50M to the server block that listens to port 443 but not the server block that listens to some other port number. In the same way you can add it for particular directive/URL location /uploads { ... client_max_body_size 50M; }

After the above steps you need to check the syntax of your updated config file by below command:

$ sudo nginx -t If there are no errors run the following commands to restart:

$ sudo service nginx reload #debian/ubuntu

$ systemctl restart nginx #redhat/centos

Please refer to the documentation.

about 4 years ago · Juan Pablo Isaza 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