【Docker】docker,nginx,php使用curl报错?

nginx错误日志

2020/02/12 08:44:29 [error] 7#7: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.48.1, server: local.psychology.com, request: "POST /api/notify/send/ZXCS158138970909500070 HTTP/1.1", upstream: "fastcgi://192.168.48.4:9000", host: "local.psychology.com"

192.168.48.1 - - [12/Feb/2020:08:44:29 +0000] "POST /api/notify/send/ZXCS158138970909500070 HTTP/1.1" 502 494 "-" "PostmanRuntime/7.21.0"

192.168.48.1 - - [12/Feb/2020:08:46:53 +0000] "POST /api/notify/send/ZXCS158138970909500070 HTTP/1.1" 200 29 "-" "PostmanRuntime/7.21.0"

post提交第三方出现
【Docker】docker,nginx,php使用curl报错?

我的docker-compose 配置

version: '2.2'

services:

nginx:

container_name: nginx

image: nginx:1.17.6-alpine

restart: always

ports:

- 80:80

- 443:443

volumes: #Overwrite nginx configuration

# 挂载配置文件

- ./nginx/sites/:/etc/nginx/conf.d/:ro

# 这里设置 宿主项目目录

- ${PROJECTPATH}:/var/www:rw

# 本地log目录映射

- ./nginx/log:/var/log/nginx

networks:

- app_net

php:

container_name: php

build:

context: ./php/php${PHP_VERSION}

args:

PHP_VERSION: ${PHP_VERSION}

SWOOLE_VERSION: ${SWOOLE_VERSION}

REDIS_VERSION: ${REDIS_VERSION}

expose:

- "9000"

ports:

- 9000:9000

- 9501:9501

- 9527:9527

volumes:

- ${PROJECTPATH}:/var/www:rw

- ./php/${PHP_VERSION}/logs:/usr/local/php/log

# 宿主主机的git密钥目录映射至容器内以便composer操作

- /Users/kalvin/.ssh/:/root/.ssh/

tty: true

working_dir: /var/www

networks:

- app_net

redis:

container_name: redis

image: redis:latest

ports:

- 6379:6379

networks:

- app_net

networks:

app_net:

driver: bridge

在php代码前打断点有输出

回答

以上是 【Docker】docker,nginx,php使用curl报错? 的全部内容, 来源链接: utcz.com/a/77829.html

回到顶部