Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jhauraw's avatar

Ubuntu Package Updates and PHP.ini / PHP FPM Config Files

When I ssh into my Linode I get the "N packages can be updated." message. When I run sudo apt-get update && sudo apt-get upgrade, two PHP config files would be affected. I'm wondering with Forge, which option to choose? Keep existing, or overwrite? Here is the options and files of concern:

Configuration file '/etc/php5/fpm/pool.d/www.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.

A new version of configuration file /etc/php5/fpm/php.ini is available, but the version installed currently has been locally modified.

How are you guys handling the non-security updates (esp. the PHP/Nginx related ones) on your Linodes or DOs tied to Forge?

Do you have a script or update process for use with Forge?

@fideloper does your book cover this? Need to get it anyway...

0 likes
12 replies
fideloper's avatar
Level 11

Howdy!

The servers are essentially yours, and Forge only managed specific things. Software upgrades are not one of them :D

This is one area where knowing a bit more about the configuration can help!

My book covers PHP-FPM's www.conf pretty extensively.

In my case, I would let the script install the updated version. Then I would go back and re-change the www.conf file as Forge makes it - likely by checking out a forge server that is not updated and comparing it (spinning a new one up just to see).

Possible (likely?) changes in the www.conf file made by Forge to check out:

  • Changing the user/group that PHP is run as to "forge" rather than "www-data"
  • Changing the listen directive to a TCP socket (e.g. 127.0.0.1:9000) over a Unix socker (e.g. /var/run/php-fpm.sock)
  • If using a Unix socket (file path), it will also have a user/group setting, which is likely also set to "forge" rather than "www-data"

Updates in general:

Updates are not really a "solved problem" in any hosting environment. A classic approach is to have a test/stage server around where you can run updates and see what breaks. A more modern approach is a "read only" server, in which you avoid writing files that need to be saved (including using a sep. server for a database) and then just re-provision a new server for any change - software or application updates. Then delete the old server, assuming the new one is up and running.

The latter typically requires a decent amount of automation. Using Linode and their Node Balancer with Forge might allow you a good middle-of-the-road approach for that, where you spin up a new server, add application deployment, and then add it to the nod balancer before removing the old server. (Forge doesn't manage the linode node balancer, you'd have to do that a bit yourself in Linode's control panel).

2 likes
bashy's avatar

You can normally see the changes compared to your local version (On Debian it's D to compare). All that's ever changed is some comments and I've seen a new option about twice in 3 years. Probably don't need to if there's no changes/new options.

2 likes
jhauraw's avatar

Great tips guys. Not too many resources for Forge in regards to dev ops and we are in production, so check, check, double check before doing anything new. Thank you all and @fideloper - book bought. Done.

bashy's avatar

Forge is just a control panel (like any other one that's attached to a server). Read up on Linux and configuration for PHP and Nginx etc for it :)

jhauraw's avatar

@bashy, yup, knew that. The issue is that what Forge modifies when spinning up a new server is not documented, unlike other control panels.

bashy's avatar

I have a rough idea and it's really not that different to what I'd do for my server's L(A/N)MP setup (mostly Nginx these days).

bashy's avatar

I get so confused with the E in LEMP. However it's pronounced, it should be N :(

It has "include /etc/nginx/conf.d/*.conf;" but there's no conf.d directory. Hummmmmmm

jhauraw's avatar

@bashy: That dir is empty by default. I added a .gitkeep to the repo so it would get pulled up by git.

bashy's avatar

Cool beans. I always delete that folder and include :) useless ms wasted!

Please or to participate in this conversation.