Excerpt from: www.conf
Of course activated need comments in different cases.
I also tried to run from user _www command su _www -c caddy, but it was not successful, I get similarly 502 status.
OS: MacOS High Sierra 10.13.1
I noticed that there is no such problem in Ubuntu.
Maybe I have the wrong path to the socket…
Does anyone have any idea about this problem?
It all looks well configured to me. The next step might be to try removing Caddy from the setup to determine if it’s the cause of the problem. Try configuring nginx instead and see if it works with the socket.
I found that with this setting listen = /run/php/php7.2-fpm.sock in file www.conf php does not start at all, that is the config is not correct.
PHP work only listen = /tmp/php-fpm.sock
After reading all the comments in the config file /usr/local/etc/php/7.1/php-fpm.d/www.conf I realized what the problem is: ; Unix user/group of processes ; Note: The user is mandatory. If the group is not set, the default user's group ; will be used. user = user under which to run php group = group of this user under which to run php
It is also important that Caddy was launched under the same user, otherwise will be nothing work.
p.s.: what in my posts different version of php - it doesn’t matter, I just thought that the 7.2 version of the problem, it turned out that it is not.