Submitted by gnilebein on Mon, 02/20/2017 - 03:58
When i switch from fastcfgi to php-fpm i have permission Problem. The Nginx Error log shows me the following error:
2017/02/20 10:48:00 [crit] 12337#12337: *13 connect() to unix:/var/php-fpm/13857322603365.sock failed (13: Permission denied) while connecting to upstream,
The socket file is owned by root. I think you have to add the following lines to the fpm configuration.
listen.owner = username
listen.group = username
listen.mode = 0660
Status:
Active
Comments
Submitted by JamieCameron on Tue, 02/21/2017 - 22:54 Comment #1
The next release of Virtualmin will fix this by setting the correct permissions on that socket file.
Submitted by Kintaro on Thu, 02/23/2017 - 08:51 Comment #2
how about name the sock file and the fpm configuration file inside pool.d directory with the virtualhost name?
Submitted by JamieCameron on Thu, 02/23/2017 - 22:46 Comment #3
I explicitly chose not to do this, as the domain name can change, but the domain ID is always constant in Virtualmin.
Submitted by Kintaro on Fri, 02/24/2017 - 04:48 Comment #4
IMHO the problem is that is that if you need to change php-fpm configuration actually you need to modify the file so, every time, you need to identify the domain id.
Adding the possibility to change/add configuration to php-fpm pool configuration will solve this problem (see ticket https://www.virtualmin.com/node/48461.
@Kintaro you could run
grep -iR "domain"
inside the php-fpm.d directory to easily find the config file instead.Submitted by JamieCameron on Fri, 02/24/2017 - 17:47 Comment #6
You can also find the ID of a domain with a command like :
virtualmin list-domains --domain whatever.com --id-only
Submitted by Kintaro on Mon, 02/27/2017 - 03:24 Comment #7
ok thank you