问题1:nginx [error] 106793#0: *46318 client intended to send too large body: 4638202 bytes
原因
上传的文件太大,超过了nginx限制数。
解决方案
- 修改nginx.conf配置:
http{
client_max_body_size 64M; #多少M根据实际情况填写
}
- 重启nginx即可
问题2:ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library
- 需要安装pcre包。
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
你可能还需要安装
sudo apt-get install openssl libssl-dev