where is php-fpm getting its config values on osx

php-fpm.conf location is determined by the option

--sysconfdir=/path/to

specified when invoking $ ./confugure just before compiling php-fpm.

Usually it is /etc but may be different in your case.

Invoking $ php-fpm -i will show the options passed to configure.

Just look after Configure Command =>.

From the comments I see you have found '--sysconfdir=/private/etc' so I would look right there.


Note that you can invoke php-fpm specifying a different location for the configuration file using the -y option.


Because you mentioned local you must be using Homebrew and so the php-fpm config file is at:

/usr/local/etc/php/7.4/php-fpm.conf

And the www pool config is at:

/usr/local/etc/php/7.4/php-fpm.d/www.conf

Note the path version number will change in the future.

You can put your own configs in the same folder as www.conf (they must end in .conf to be included). E.g. I added one that had listen = /usr/local/var/run/php-fpm.my-username.sock which I learned here so I could use a socket instead of a port for my Site virtual server.

I found these other commands useful:

To view the logs:

tail -f /usr/local/var/log/php-fpm.log

To check the user fpm was launched as:

ps aux | egrep 'php'

And be sure to start the brew service with sudo and if you accidentally start one without sudo be sure to stop it:

sudo brew services start php