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

164
Views
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 answers
Answer question

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 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!