找不到php fpm.pid,找不到文件nginx php-fpm

我在这里查看了这样的每个问题并试图应用所述的修复但没有成功.

我正在使用wordpress:4.7.3-php7.0-fpm-alpine docker图像,前面有一个单独的nginx容器.

当我卷曲wordpress时,我得到:

File not found.

当我检查wordpress容器日志时,我得到:

127.0.0.1 - 16/Mar/2017:06:26:24 +0000 "GET /index.php" 404

127.0.0.1 - 16/Mar/2017:06:31:27 +0000 "GET /index.php" 404

127.0.0.1 - 16/Mar/2017:06:32:16 +0000 "GET /index.php" 404

127.0.0.1 - 16/Mar/2017:06:37:17 +0000 "GET /index.php" 404

127.0.0.1 - 16/Mar/2017:06:39:09 +0000 "GET /index.php" 404

实际的nginx错误是:

2017/03/16 06:26:24 [error] 17#17: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 10.128.0.7, server: k8wp, request

: "GET / HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000"

我正在使用php 7

/var/www/html # php-fpm -v

PHP 7.0.16 (fpm-fcgi) (built: Mar 3 2017 23:07:56)

Copyright (c) 1997-2017 The PHP Group

Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

with Zend OPcache v7.0.16, Copyright (c) 1999-2017, by Zend Technologies

我的nginx配置是

server {

root /app;

# Add index.php to the list if you are using PHP

index index.php index.html index.htm index.nginx-debian.html;

server_name _localhost;

location / {

# First attempt to serve request as file, then

# as directory, then fall back to displaying a 404.

try_files $uri $uri/ =404;

}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

location ~ \.php${

try_files $uri =404;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

}

我正在运行nginx作为用户www-data:

user www-data;

根据/usr/local/etc/php-fpm.d/www.conf,用户和组被取消注释并设置为www-data

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值