Home > Article > Operation and Maintenance > Modify nginx upload file size configuration
According to the official documentation, you can add configuration client_max_body_size size; in the http, server, location and other configuration blocks in the nginx configuration file to adjust the body size of the files allowed to be uploaded by the client. Set to 0, indicating no limit.
(Recommended tutorial: nginx usage tutorial)
nginx default client body size is 1M.
The specific configuration is as follows:
http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; client_max_body_size 100m; .... }
The above is the detailed content of Modify nginx upload file size configuration. For more information, please follow other related articles on the PHP Chinese website!