Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda