Modify the size limit of uploaded files in nginx

Source: Internet
Author: User
Nginx modifies the size of the uploaded file to limit the size of a newly installed server and uses nginx as the proxy. I suddenly found that the client file uploaded for more than 1 MB could not be uploaded normally, so I modified the nginx configuration. Cd/export/servers/nginx/conf/nginx. conf. In this configuration, modify the size of the uploaded file to restrict the newly installed server and use nginx as the proxy. I suddenly found that the client file uploaded for more than 1 MB could not be uploaded normally, so I modified the nginx configuration. Cd/export/servers/nginx/conf/nginx. conf, the location/{root html; index index.html index.htm; client_max_body_size 1000 m;} in the server segment in this configuration file cannot be restarted. Later, we found the configuration file: sendfile on; # tcp_nopush on; # keepalive_timeout 0; keepalive_timeout 65; # gzip on; include domains /*; # include domains/chat. local; # include domains/chat.erp.com; # include domains/support.chat.com; # include douains/chat.com; server {listen 80; server_name localhost; the sub-configuration file is found, modify the configuration file. The configuration file is configured as follows: server {listen 80; server_name chat.erp.360buy.com; # access_log/export/servers/nginx/logs/chat.erp.360buy.com; location/{proxy_pass http://tomcat ; Client_max_body_size 1000 m;} restart with/export/servers/nginx/sbin/nginx-s reload to solve the problem of limited file size. I will share my solution process and hope to help you.
Related Article

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.