I've seen millions of websites using nginx as a proxifying webserver working together with Apache. But I've seen very few servers running nginx only as their default webserver. What are the main downsides of such config?
I can see some:
- Inability to use per-directory config files like .htaccess so every configuration change should be done to main server config file and requires server reload. But pecl htscanner can compensate them for php settings
- Unavailability of mod_php for nginx, which can be compensated by php-fpm for example.
What are others? Why don't people just drop Apache and move to nginx or any other lightweight solution? May be, there are some special reasons?
EDIT: this question is primarily about working with LAMP stack.
From my #nginx experience it is almost always because of familiarity with the Apache .htaccess files and not wanting to lose that or otherwise depending on it. For example people running shared server hosting who wants to offload static files only and keep apache for their users to fiddle with.
And I honestly can't really think of any other reasons for proxying to Apache other than keeping .htaccess for end-users.
Edit: Actually mod_php plus phpsuexec for shared hosts might be another reason for sticking with Apache.
If you've got a bunch of people who can make Apache work well, why bother relearning a whole new app and configuration, migrate mod_rewrite rules, redo mod_perl/php/etc configurations, re-test, re-deploy?
Both software stacks may be free but, "re-train, re-develop, re-test" isn't, and it's time you could be adding features your users care about1, rather than tinkering for the sake of tinkering.
1 I'm obviously not talking about personal projects, there.
I like Nginx, but two things stop me from using it for my web sites.
It's hard to setup PHP-FPM. I haven't succeeded to do it with the latest PHP version yet.
Nginx hasn't support for HTML5 Websockets, which I'm interrested in.