A server that uses nginx as a 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.
Location /{
Root html;
Index index.html index.htm;
Client_max_body_size 1000 m;
}
When the client_max_body_size field is added, it cannot be restarted. Later, the sub-configuration file was found in the total 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 and modified in the sub-configuration file. The configuration file is 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.