fibroblast 最近的时间轴更新
fibroblast

fibroblast

V2EX 第 472350 号会员,加入于 2020-02-26 03:34:13 +08:00
fibroblast 最近回复了
哈哈不错不错
转移因子,口服液试试吧
@julyclyde 文件要给 FastCGI 好的
@wheat0r ok 了解了
@wheat0r 那个我拉住你问下 因为我是刚刚接触 php 我想问下就是 如果把 php 也扔进 docker 那么 写代码是不是会很麻烦啊
@yulgang 好的感谢
@yulgang 不是 fpm 在宿主机 nginx 在 docker
@ysc3839 好的好的 我为我愚蠢的行为搞到抱歉
@julyclyde 我理解您的意思 目前我把 nginx 改为了
···
location ~ \.php$ {
root /usr/share/nginx/html; #页面文件根目录
fastcgi_pass host.docker.internal:9000; #php-fpm 的通信端口,由于已经将容器 9000 端口映射到了主机的 9000 端口,所以这里填“主机 ip:9000”也是可以的。
fastcgi_index index.php; #默认主页文件设置
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include fastcgi_params;
}
···

nginx error
```
FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.65.1, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://192.168.65.254:9000", host: "127.0.0.1:8088"
```
@julyclyde 好的我想我应该明白了
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1027 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 14ms · UTC 20:03 · PVG 04:03 · LAX 13:03 · JFK 16:03
Developed with CodeLauncher
♥ Do have faith in what you're doing.