Hacker News new | ask | show | jobs
by no_wizard 2566 days ago
The conversation in this thread has made me wonder after reading it if anyone uses Apache2 as their webserver anymore.

Edit: seems many still do! I thought it was dying slowly as php popularity was going down.

4 comments

Yes. Any time I need to use cgi's, php, or anything where security outside of Apache can be controlled by an Apache module, I will always default to Apache as the security control story is better. Performance wise, Apache 2.4 using the latest APR libraries is equal to NGinx.

There are also far fewer bugs and updates to the Apache core. I rarely have to recompile anything.

I have also had many frustrating interactions with the lead developer of NGinx. There are many assumptions made and many things hard coded in the Makefile, especially as it pertains to pcre, zlib, openssl and CFLAGS, LDFLAGS, etc. Also, I can't just point to existing pcre and zlib deployments for inclusion. NGinx wants the source and to recompile the extra libraries each time.

The global trend for Apache is not looking good, and I believe a large part of its popularity is simply a legacy of its dominant position a decade ago.

Over the last 10 years, it probably lost half of its share. The exact figures vary with the source: according to the link below, Apache's share of the million busiest web sites went from 66% in 2011 to 32% now.

https://news.netcraft.com/archives/2019/05/10/may-2019-web-s...

Of course, for anything that is cgi/fastcgi. nginx doesn't support that.

There is also stuff running on mod_php/mod_python/mod_wcgi that is bound to apache, however these are deprecated and unstable technologies that should not be used in this decade.

nginx supports fast cgi

https://www.nginx.com/resources/wiki/start/topics/examples/f...

I imagine it supports cgi calls too

Nginx does not support CGI, but you can for example use uWSGI as a application server behind nginx.
For reference, WSGI is python only, it's an interprocess communication method very similar to fastcgi with the same purpose.
Seems like it can work with others too, though I don't know how well: https://uwsgi-docs.readthedocs.io/en/latest/LanguagesAndPlat...
Reading that documentation page will tell you that nginx cannot spawn fastcgi processes ;)
What conversation?

Been using apache2 for like 20+ years now. It is doable to switch to something else, but would probably require effort with various details, etc. It works well for our moderate loads, so not really urgent to change it.

Hehe I still have the unbreakable 1.3 running on some home machines. It doesn't want to die so I'm not forcing it :-)
No one up till this point ever mentioned using HAProxy with Apache
The conversation has mostly been about NGinx vs HAProxy, at the balancer level, has it not?