Nfs – Advantages and disadvantages to using NFS with Apache

apache-2.2nfs

I am coming into an environment where they are using NFS to access PHP scripts and static web content that is stored on a server that is on the same network as the front end Apache server. Only one front end Apache server is accessing these files over NFS so it isn't a situation where they are load balancing the front end Apache boxes.

We are in the process of virtualizing the Apache and NFS servers. We are in disagreement over if it makes sense to still be using NFS in this situation or just having all the web content stored locally on the same machine as the web server. What do you all think?

Thanks for any input.

Best Answer

You only need NFS if you need multiple-client access at a filesystem level. Since you don't need multiple-client access, I really wouldn't recommend NFS as the best choice.

Even if you do have multiple Apache servers, I still wouldn't recommend using NFS as the means of sharing your code between machines. Automated deployment tools can easily distribute code to as many locations as you like near-simultaneously. NFS might be the best choice for user-provided assets, but that's still not as cut-and-dried as it might initially appear (my opinions on this topic are available in this other answer).