logoalt Hacker News

theandrewbailey • today at 11:37 AM • 1 reply • view on HN

I don't understand this. NGINX can run PHP. PHP is not exclusive to Apache.


Replies

Joel_Mckay • today at 11:59 AM

In general, the Apache php mod has had less drama than php-fpm over the years. Also, casting each domain under specific isolated itk server user(s) account(s) adds a layer of containment, where Nginx processes must run under a single user context.

Nginx uses way less memory in most use-cases (1/4 to 1/10), but with dynamic content like php it is only slightly better (maybe 15% if lucky). Also, setting up websocket proxy in Nginx is still a bit of a bodge.

Each server type has its own trade offs, and a list of known mitigations the uninitiated must learn. If you have a single domain high-traffic site with static media files, than Nginx is probably going to matter more. =3