A server that uses Nginx as an agent. Suddenly found that upload more than 1M large client files can not be uploaded correctly, and then modified the configuration of the next nginx.
Cd/export/servers/nginx/conf/nginx.conf, in the server section of this configuration file,
Location/{
root HTML;
Index index.html index.htm;
Client_max_body_size 1000m;
}
Add the Client_max_body_size field, how to restart is not possible. Later, a profile was found in the general 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;
So I found the configuration file, in the allocation file to make changes. The profile 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 1000m;
}
}
With/export/servers/nginx/sbin/nginx-s reload reboot, the problem of the size of the uploaded file is solved.