On 05 Mar 13:00, Mark Rogers wrote:
I am considering a strategy for migrating a server from Apache to Nginx (I've never used nginx before so I'll be doing all this on a test box first).
Why are you wanting to migrate to nginx? I've seen many instances of nginx falling over and then not being able to be restarted cleanly, leading to all manner of fun.
Where you using mod_php in apache? Are you planning on using the same system in nginx? i.e. you're still not seperating users from each other and you still have all the issues of php to deal with, except now you're in a less tested environment with a relatively young and unproven webserver.
The strategy is something like: install nginx alongside apache but using (say) port 81. Configure all the virtual hosts so that if <url> works now (on Apache), <url>:81 should also work on nginx, running concurrently. Test. (The idea is to get customers to do some final checks on their own sites, so this should work with minimum fuss.) When ready, kill apache and switch the port over on nginx.
Customers tend not to test things, no matter how nicely you ask them. What actually happens is that they say "yeah, that's all fine!", then 2 weeks after you've changed things they go "oh, hang on, this bit is broken, and this, and this..."
All the sites are running PHP/MySQL (except for a few static sites).
So, erm, the only thing that nginx is supposedly better at than apache is serving static sites... not a lot of yours are... erm... why are you moving to it again? (Please, don't tell me it's because "I heard of nginx and someone told me it was cool!")
Aside from making sure I have enough RAM to run both alongside each other, any reason to avoid this approach?
Only as outlined above - i.e. why fix something that isn't broken.
Cheers,