PHP 7 PHP-FPM Configuration File Location?

Last updated on | 2 replies

In this article we will locate a few different config files that relate to your PHP-FPM install. FPM uses php.ini syntax for its configuration files php-fpm.conf and pool configuration file www.conf.

php.ini

If you are looking for the php.ini file, please see article: Where is my PHP php.ini Configuration File Located?

php-fpm.conf

If you have the locate command, you can simply search for the file:

locate php-fpm.conf

Alternatively, confirm which version of PHP you are using by listing the PHP directory.

ls /etc/php/
7.2

Above we are on version 7.2, therefore, php-fpm.conf should be in /etc/php/7.2/fpm/php-fpm.conf.

To edit the php-fpm.conf PHP-FPM config file with nano:

sudo nano /etc/php/7.2/fpm/php-fpm.conf

www.conf

php-fpm.conf isn’t all of the php-fpm configuration. For serving web requests, php-fpm creates a new pool of processes, which have a separate configuration file www.conf.

If you have the locate command, you can simply search for the file:

locate www.conf

Alternatively, confirm which version of PHP you are using by listing the PHP directory.

ls /etc/php/
7.2

Above we are on version 7.2, therefore, the www.conf file should be in /etc/php/7.2/fpm/pool.d/www.conf.

To edit this file:

sudo nano /etc/php/7.2/fpm/pool.d/www.conf

Further Resources

Fore more in-depth information on PHP configuration, see the official manual at php.net.

 

 

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

2 replies

Leave a reply

Your email address will not be published. Required fields are marked *

  1. Configuring PHP-FPM with Apache is quite difficult and time taking. I tried to do it manually on my local, but since I don't have server side knowledge I got stuck.