LoginSignup
3
1

More than 5 years have passed since last update.

nginx+php-fpmで.phpのページだけNot Foundになるとき

Posted at

環境:

  • Debian9
  • nginx/1.14.0
  • php7.0-fpm

nginxのerror.logに

connect() to unix:/run/php/php7.0-fpm.sock failed (13: Permission denied)

のようなエラーが出ている

方法

sudo vi /etc/php/7.0/fpm/pool.d/www.conf

;listen.owner = www-data
;listen.group = www-data

とあるのを

listen.owner = nginx
listen.group = nginx

に変更して

再起動
sudo /etc/init.d/php7.0-fpm restart

参考:

Permission Denied for fastcgi_pass using PHP7

Nginx で「502 Bad Gateway」とか、なんだかエラーログがでるよって時

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1