docker中运行lnmp环境界面502,nginx错误日志提示/run/php/php7.0-fpm.sock failed
docker中中运行lnmp开发环境,界面报502错误进入dockerdocker exec -it createIDbashtailf /var/log/nginx/error.log 错误信息:2017/06/26 14:45:14 [crit] 11#11: *21 connect() to unix:/run/php/php7.0-fpm.sock failed (2: No su
·
docker中中运行lnmp开发环境,界面报502错误进入docker
docker exec -it createID bash
tailf /var/log/nginx/error.log
错误信息:
2017/06/26 14:45:14 [crit] 11#11: *21 connect() to unix:/run/php/php7.0-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: 172.19.0.1, server: 127.0.0.1, request: "GET /user/index HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "127.0.0.1"
提示是找不到/run/php/php7.0-fpm.sock文件,进入/run, 发现只有/run/php7.0-fpm.sock。将docker的nginx配置文件中的fastcgi_pass配置改成/run/php7.0-fpm.sock,重启docker即可
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php7.0-cgi alone:
#fastcgi_pass 127.0.0.1:9000;
# With php7.0-fpm:
fastcgi_pass unix:/run/php7.0-fpm.sock;
}
更多推荐
已为社区贡献2条内容
所有评论(0)