昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期四, 十一月 22, 2018

413 Request Entity Too Large nginx

用Nginx-proxy 的网站,上传文件时碰到413错误的解决方法

只是要加一个任意名字的conf 文件到 /etc/nginx/conf.d/ 里面。 注意扩展名一定要是 .conf

加一行client_max_body_size 100m; 在这个文件里面就可以了

然后重启nginx proxy

以下是我在ubuntu 服务器中的操作命令

#I have the nginx-proxy docker container named as nginx-proxy as well, modify to your own name
sudo docker exec -it nginx-proxy bash
# 100m is a big size, you may want to reduce it
echo 'client_max_body_size 100m;'   > /etc/nginx/conf.d/my_proxy.conf
exit
sudo docker stop  nginx-proxy
sudo docker start nginx-proxy


没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.