Limit the size of uploaded files

Source: Internet
Author: User

Client_max_body_size is used to set the maximum allowable client request principal size, in the request header there is "Content-length", if this configuration item is exceeded, the client will receive a 413 error, that is, the requested entry is too large

Worker_processes  2;worker_cpu_affinity  10;user  nginx nginx;error_log  logs/error.log  Error ; events {    use  epoll;    Worker_connections  20480;} HTTP {    include       mime.types;    Server_names_hash_bucket_size  ;         Default_type  Application/octet-stream;    Sendfile on        ;    Keepalive_timeout  ;    Server_tokens off;
client_max_body_size 8m; # Set client's maximum request body size to 8M Include vhosts/*.conf;}

Limit the size of uploaded files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.