Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Thanks!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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