mjruschak wrote:
Simply put. I just noticed that a lot of folks on here are running a reverse proxy and was wondering what the advantages if any of that would be. I don't see any but being a new Nginx user I am not totally aware of any (if any) disadvantageous.
Well, given an existing nginx/php configuration, I don't think there are any automatic advantages, sans something Apache can do that nginx can't. In terms of disadvantages, I suppose it's really just needing to support two server configurations and their integration, plus whatever additional resource running two servers takes up. So I wouldn't do it just for the heck of it, but there are certainly cases where it can make sense.
I think that typically people end up down this road by having used Apache first - often with mod_php rather than trying to set up a standalone php server - and then trying to further tune the resource it is using. So fronting it with nginx is an easy way to reduce load for static resources, while retaining their existing configuration with Apache handle the dynamic stuff.
When coming at it the other way (already having nginx and php working without Apache), there's less of an incentive to introduce Apache to the mix. However, I certainly wouldn't hesitate to do so if it had a feature that I particularly wanted. Whether that be .htaccess, better integration/support with an application stack you are using, or just some feature nginx can't quite match (e.g., cgi-bin), adding Apache behind nginx can in such cases be the best approach. But the need threshold is perhaps a little higher to add Apache to an existing nginx installation than vice versa.
Or to put it another way, let's say .htaccess support for users in their own private folders was a requirement (rather than a thought experiment) for your system for some reason. I wouldn't have any problems recommending the introduction of Apache and having nginx proxy requests for those portions of the site to it, rather than trying any workarounds to keep solely using nginx. And as with going the other direction, there's no real reason to disrupt your existing nginx/php setup by completely switching to Apache - just insert it into the mix for the stuff you need it for.
-- David