4 ms·
Apache is fine. No reason to switch to nginx unless there is something nginx offers that apache doesn't. In earlier days a lot of people was under the impressi
by NorwegianDude 5y ago
Apache is fine. No reason to switch to nginx unless there is something nginx offers that apache doesn't.
In earlier days a lot of people was under the impression that nginx was much faster for PHP, but that was not true. Apache with mod_php was faster, but the issue was memory consumption for non php files as the php module was loaded on every request, even if it wasn't php.
When using php-fpm you don't need the php module on every request as php-fpm is contacted as needed. This does increase latency and decrease performance for php requests, but the difference is indistinguishable for most people.
Slowloris attacks was/is one issue with non event-based webservers.
Both nginx and apache can handle a six digit number of php requests each second on a low end server. You application(Wordpress, Laravel) will without a doubt be a bottleneck before the webserver becomes the bottleneck.
- tyingq 5y agoMost of the benchmarks I'd seen showing Nginx as significantly faster than Apache boiled down to configuration. Having mod_rewrite turned on with AllowOverride for Apache, for example, slows it down quite a lot.
- matja 5y agoI remember one of the early "selling points" of nginx was it didn't traverse the directory tree for a .htaccess file to dynamically load config from, for each request, when that was specifically a "selling point" of Apache, which is very useful for shared hosting contexts when users don't have access to change the webserver config.
- NorwegianDude 5y agoConsidering that that's something you can choose to do with apache isn't a selling point for nginx. It's an optional feature nginx lacks. But yeah, there was a lot of weird and misinformed reasons for why people recommended others to use nginx no matter what the use case was.