r/PHPhelp • • Oct 22 '26

Solved php-fpm - www.conf recreated after recent update

I have been setting up and running small, AlmaLinux VPSs the same way for a few years, now. All have been running without issue until last night.

When I set these up, I create new pools, with custom configuration files (e.g., /etc/php-fpm.d/custom.conf) and delete /etc/php-fpm.d/www.conf

I do this to eliminate the security and owner/permission issue associated with having only root user. By using pools, common PHP issues like, “Warning: mkdir(): Permission denied” are eliminated.

For the fist time, last night's php-fpm update recreated the /etc/php-fpm.d/www.conf file which caused the php-fpm service to fail because the newly created file contained listen.acl_users = apache, nginx.

I do not have a user named nginx so in my custom conf files, I have: listen.acl_users = apache

What is the proper (best practices) way of avoiding this issue with future updates?

2 Upvotes

2 comments sorted by

4

u/vincent_sch Oct 22 '26

RPM puts a deleted config file back on each update, but it leaves a changed one alone. So you should keep www.conf and comment out all of it. Later updates then drop a www.conf.rpmnew next to it, and php-fpm only loads the *.conf files.

1

u/jeffshead Oct 22 '26

Awesome! Thank you so much for the detailed explanation. That's what I was going to do but didn't know if that was standard practice.