方法如下:
我们找到nginx的配置文件
nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
可以看到打印结果是在/etc/nginx/nginx.conf
,接下来编辑它
vim /etc/nginx/nginx.conf
在http内加入client_max_body_size 10m
, 如下所示
[...] http { [...] client_max_body_size 10m; [...] } [...]
重载配置或者重启nginx
service nginx reload
or
service nginx restart