Security News > 2020 > August > How to limit file upload size on NGINX to mitigate DoS attacks

How to limit file upload size on NGINX to mitigate DoS attacks
2020-08-07 17:28

If you have an NGINX site that must allow users to upload files, try this configuration to help prevent possible Denial-of-Service attacks.

Out of the box, NGINX sets a limit of 1MB for file uploads.

What can you do when you need to allow users to upload more than a single MB to your NGINX site? You control it with the client max body size directive.

The first thing we're going to do is change the upload limit to 100MB in the nginx.

Your NGINX server is now a tiny bit safer from DoS attacks, while still allowing your users to upload files.


News URL

https://www.techrepublic.com/article/how-to-limit-file-upload-size-on-nginx-to-mitigate-dos-attack/#ftag=RSS56d97e7