2023 年六月 一 二 三 四 五 六 日 « 二 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 分类目录
-
近期文章
近期评论
- Dillon 发表在《Mac OS代理工具Proxifier》
- RobertFluch 发表在《Bash Shell 快捷键》
- brew 不可用,重新安装 发表在《Mac下删除自己安装的Python》
- 子陵 发表在《Mac下删除自己安装的Python》
- Yucun 发表在《Mac下删除自己安装的Python》
文章归档
标签
7-zip 7zx active record CentALT cookie crontab dreamhost eclipse EPEL fast GarageBand google hyk-proxy LITTECMS mail mysql2 MySQLdb netgear nginx office PIL ports Proxifier pydev python readability requests sleep timeout torrent ubuntu unicorn urllib2 urlopen web.py yum zoc 下载 二笔 亿恩科技 吉他 睡眠 编码 路由 郑州景安
Tag Archives: nginx
nginx client_max_body_size 的问题
遇到上传文件问题 “413 Request Entity Too Large” 查到了 nginx client_max_body_size ,原来默认值只有 1m,太小了 增大他,在 location 中添加下面设置 client_max_body_size 6m; nginx reload, 不生效, 再试,把上面设置放 server 中,还不生效,继续放 http 中,这回生效了 这是什么问题,nginx 的文档上面明明写着 他可以放在 http server location 里面的 这是 nginx 的 bug,还是 nginx 的特性 如果是特性的话我想 http server … Continue reading
ActionDispatch::RemoteIp::IpSpoofAttackError
使用 unicorn + nginx 运行 rails 有一段时间了,之前 nginx 这样配置 ip 地址 proxy_set_header X-Real-IP $remote_addr; 发现 rails 中获取到的 ip 是 127.0.0.1 , 然后又配置 CLIENT_IP proxy_set_header CLIENT_IP $remote_addr; 这样配置之后就发现了 rails 的错误 ActionDispatch::RemoteIp::IpSpoofAttackError 原来 rails 有 ip 防欺骗,再改 ningx 配置,加入 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; … Continue reading
php-fpm 空白页面
使用 remi yum 源安装的 php-fpm 5.4,安装之后访问 php 页面出现空白的情况, http 状态码是 200, 所有日志里面都没有任何信息。 经过各种排查,终于找到问题: nginx配置中缺少 fastcgi_param SCRIPT_FILENAME $request_filename; 为什么会缺少这个配置呢 原因是原本程序是运行在 ubuntu server 中,现在迁移到 centos 中。 经过比较 ubuntu 和 centos 的 nginx 默认配置,在 fastcgi_param 文件中 centos 就 缺少上面那行配置,而 ubuntu 默认就有。