nginx:502在Mac OS X上使用Curl / https的Bad Gateway [英] nginx: 502 Bad Gateway with Curl/https on Mac OS X

查看:834
本文介绍了nginx:502在Mac OS X上使用Curl / https的Bad Gateway的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚为什么每次尝试使用curl时我的nginx都会崩溃:

I can't figure out why my nginx is crashing each time I try to use curl:

重现崩溃的代码片段:

$request = new \Buzz\Message\Request('GET', '/', 'https://google.com');
$response = new \Buzz\Message\Response();
$client = new \Buzz\Client\Curl();
$client->send($request, $response);

申请日志

2015/12/29 11:42:30 [error] 213#0: *416 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: dev-fr.local.xxxx.com, request: "GET /login/check-vkontakte?code=xxxxx HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev-ru.local.xxxx.com", referrer: "https://dev-ru.local.xxxx.com/"

/var/log/system.log

Dec 29 11:40:54 Alains-MacBook-Pro.local ReportCrash[75875]: Saved crash report for php-fpm[75864] version 0 to /Users/alain/Library/Logs/DiagnosticReports/php-fpm_2015-12-29-114054_Alains-MacBook-Pro.crash

崩溃报告(开始)

Process:               php-fpm [75865]
Path:                  /usr/local/Cellar/php56/5.6.15/sbin/php-fpm
Identifier:            php-fpm
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        php-fpm [75858]
Responsible:           php-fpm [75858]
User ID:               501

Date/Time:             2015-12-29 11:42:30.733 +0100
OS Version:            Mac OS X 10.10.5 (14F1021)
Report Version:        11
Anonymous UUID:        1DC6CEB0-0479-4A5E-FFD2-E48BA3961196

Sleep/Wake UUID:       A704AF01-8AE8-44D2-BBF3-DED65D834B0B

Time Awake Since Boot: 29000 seconds
Time Since Wake:       3000 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000110

我搜索了几个小时并且总是放弃,但现在我很累了真的想解决它。

I searched for hours and always given up, but now I'm tired and really want to fix it.

完整崩溃报告: http://ninsuo.com/cra sh-nginx-xxxx.html

我的phpinfo(): http://ninsuo.com/phpinfo-xxxx.html

My phpinfo(): http://ninsuo.com/phpinfo-xxxx.html

推荐答案

更好的做法是重新安装php

Better practice is to reinstall php with

brew install --with-fpm --with-homebrew-curl --with-homebrew-openssl --with-imap --with-homebrew-libxslt --without-snmp php56

然后重新安装curl with

and then reinstall curl with

brew install --with-openssl curl

这篇关于nginx:502在Mac OS X上使用Curl / https的Bad Gateway的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆