I've got two servers running Ubuntu 10.10 and 10.04.

In the 10.04 server, /etc/php5/fpm contains a php5-fpm.conf. In the 10.10 server, /etc/php5/fpm contains a main.conf.

I'm trying to automate my conf updates, so they need to both use the same file, but I can't figure out how to tell php where the conf should be found.

What I'd like to do is rename main.conf to match the other server's php5-fpm.conf, but I don't want to chance breaking php to do it as it would mean down time for my users.



If you want to test something, you use your test environment -- that's what it's there for. Even better is to have the ability to quickly throw together a scratch environment in which you can play around with things like this and then throw them away when their purpose has been served.

As far as the filename goes, it's location is configured in the FPM init script (or however you choose to start and stop it). Hence, there are several ways you could handle the situation, from a symlink if required, to providing a modified init script, or just detecting what the config file should be called (either based on the Ubuntu release of the machine, or -- far better -- by examining the init script on the system) and putting it in the right place. You could even take the "shotgun" approach of putting it in both places on all machines, if you wanted.

  • Sadly, one of these servers is the test server, and one is the production server. I'm trying to make them identical so I can use the same update scripts to replace my conf files. I think it's going to be the shotgun approach for now, but I now see the line in the init which tells where to find the conf. Thanks!
    – Mnebuerquo
    Aug 22 '11 at 13:07
  • You really want your test and prod environments to be identical. Upgrade or downgrade the OS versions so they match.
    – womble
    Aug 22 '11 at 22:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.