News for hackers. Stuff that matters.
Re:The long life of Apache httpd 2.4 by idoubtit on Saturday May 20, 2023 @04:30AM (#36010282)
What's missing from this history is the origins of Apache httpd 2.4: as I see it, circa 2009 Nginx started growing. Apache's market share was like fresh snow under foehn (from 75% at this time down to 20% today). Nginx was much more performant and its configuration was saner. Apache had to change or it would gradually disappear.

Another note on this 10 years anniversary is that, though Apache 2.4 was released in 2012-01, it was a rushed release and some features were still lacking. In my opinion, the most important was that mod_proxy could not talk to unix sockets. It made Apache 2.4 hard to use in many cases. This feature only appeared with 2.4.7 in 2013-09.

Nowadays I rarely see Apache installed on web servers that I work with. In one case, it was because the sysadmin was used to it (though 2.4 broke the compatibility with 2.2's config syntax), he didn't consider changing and even kept the awful Apache prefork engine. In other cases, it was because of some modules (e.g. shibboleth) that were packaged by the OS for Apache, but not for Nginx.

Re:The long life of Apache httpd 2.4 by tempestn on Saturday May 20, 2023 @05:14AM (#36010434)
Is nginx still considerably more performant than Apache when both are configured well? (IE. Using mpm_event, not needlessly recycling processes, using mostly threads for concurrency, etc.?)

I'm one of those who always just stuck with Apache because 1) I'm used to it, and 2) it's never been close to a bottleneck in our stack. Especially now that the vast majority of static content requests don't even hit the servers at all. Buy I am curious! I haven't looked at comparisons in years, but last I did, everyone liked to compare nginx to prefork Apache, which is pointless.

Re:The long life of Apache httpd 2.4 by water9 on Saturday May 20, 2023 @05:20AM (#36010456)
HAProxy is faster than both of them for load balancing. Apache is slightly faster for static content. Nginx has more responsiveness under high load than Apache for dynamic content (Hence Tomcat workers for example)
Re:The long life of Apache httpd 2.4 by tempestn on Saturday May 20, 2023 @05:31AM (#36010501)
Is that true even if you configure Apache to use a static number of processes? IE set startservers equal to serverlimit and maxsparethreads equal to maxrequestworkers? IME that allows Apache to respond to load spikes more quickly. But is the issue with high load and dynamic content specifically related more to connecting to the process manager for the scripting language? (I take the same approach there, using a static pool of processes. Haven't had any issues, but have no way of knowing if nginx might be even faster!)
Re:The long life of Apache httpd 2.4 by water9 on Saturday May 20, 2023 @04:18PM (#36015186)
Nginx uses an event driven model where a single thread might perform work for multiple requests. Often the batching and caching of these requests can boost performance. Apache however assigns each inbound connection its own dedicated thread which makes it slightly more responsive on average. At the end of the day it's going to come down to the priority of scheduling for the threads of the program whether it be one process with 65,535 threads or 65,535 single threaded processes
Re:The long life of Apache httpd 2.4 by xorcist on Saturday May 20, 2023 @05:13PM (#36015686)
That description is not correct for any of them. Apache can use either an event queue or a thread pool, and nginx is also multithreaded and not forking. So there isn't any difference, except that Apache has a bit more knobs to tweak.
Re:The long life of Apache httpd 2.4 by water9 on Sunday May 21, 2023 @05:09AM (#36019140)
NGINX is multiprocess Single Threaded Apache is one thread per connection

Its like having the same waiter vs a pool of waiters

Sources: https://serverguy.com/wp-content/uploads/2020/10/Apache-Vs-N...

https://www.google.com/search?rlz=1C1CHBF_enUS874US874&sxsrf...

Re:The long life of Apache httpd 2.4 by xorcist on Sunday May 21, 2023 @05:22AM (#36019191)
That is just a png of some text. The text is either wrong or outdated by a decade or more.

People sometimes like to have opinions about stuff. But there's no reason to google for secondary sources when the documentation is good.

Read the manual instead. The documentation for both projects is correct, short and to the point. They are both multi threaded, multi process, with an event loop. The documentation describes how to set those parameters. Look at the thread_pool directive for nginx and AsyncRequestWorkerFactor for Apache for example.

You could of course configure one thread per connection, but that only makes sense under specific circumstances.

Re:The long life of Apache httpd 2.4 by blacklion on Saturday May 20, 2023 @03:04PM (#36014640)
Does Apache can do zero-copy for static content? nginx could on properly configured system.

TLS kills this, alas, and, I think, with TLS OpenSSL will be bottleneck for static content, not server.

Re:The long life of Apache httpd 2.4 by water9 on Saturday May 20, 2023 @04:14PM (#36015154)
I think it has more to do with the event driven nature of nginx vs the thread per connection nature of Apache.
Re:The long life of Apache httpd 2.4 by toast0 on Saturday May 20, 2023 @10:13PM (#36017387)
If you're looking for this, you want kTLS, plus or minus nic accelerated kTLS. Read the Netflix CDN presentiatons for the state of the art, and see what you can make work with your system, etc.
Re:The long life of Apache httpd 2.4 by blacklion on Sunday May 21, 2023 @11:17AM (#36021827)
I know abut Netflix work, and even some of this work trickled down to base FreeBSD (and opensource), but is still very fragile, not completely open-sourced and require very special hardware (1 or 2 models of specific NICs with specific versions of firmware) to work.
Re:The long life of Apache httpd 2.4 by rb12345 on Monday May 22, 2023 @08:51AM (#36030777)
"EnableSendfile On" will enable that on Apache, and has been around since Apache 2.0.44. It's not enabled by default though, and as you say, TLS breaks it.
Re:The long life of Apache httpd 2.4 by cheekibreeki2 on Saturday May 20, 2023 @09:39AM (#36011843)
For 99% of use cases webserver speed is rarely an issue.
Re:The long life of Apache httpd 2.4 by nordsieck on Saturday May 20, 2023 @10:51AM (#36012393)
> For 99% of use cases webserver speed is rarely an issue.

OK. But you might as well use a fast setup if there's no cost in complexity to do so.

Re:The long life of Apache httpd 2.4 by paulddraper on Saturday May 20, 2023 @04:07PM (#36015094)
Rule 1: there is always a color complexity cost
Re:The long life of Apache httpd 2.4 by paulddraper on Saturday May 20, 2023 @05:07PM (#36015619)
Rule 1: there is always a complexity cost
Re:The long life of Apache httpd 2.4 by arp242 on Saturday May 20, 2023 @12:53PM (#36013522)
We switched from Apache to lighttpd back in the day specifically for performance issues; the other option would have been to add a new server. This wasn't "Facebook scale": just a small company with 2 devs running a few sites with quite a lot of pageviews.

Since then computers (and presumably also Apache) have become faster and I don't really know how it compares today, but at least in the past it really did make a significant enough performance difference to care about.

Re:The long life of Apache httpd 2.4 by tempestn on Saturday May 20, 2023 @03:21PM (#36014763)
Were you using mpm_prefork on apache, or one of the threaded process managers?
Re:The long life of Apache httpd 2.4 by arp242 on Saturday May 20, 2023 @03:38PM (#36014898)
This was over 10 years ago... We tried a few things; but I don't recall the details.
Re:The long life of Apache httpd 2.4 by rfmoz on Saturday May 20, 2023 @02:52PM (#36014543)
Getting Apache from distro repos is like using MS Word and Nginx like Notepad. Rarely you use all the features available on Apache but, mostly at the beginning, compiling Nginx to get features was the daily routine.
Re:The long life of Apache httpd 2.4 by Freeaqingme on Saturday May 20, 2023 @05:27AM (#36010492)
I still use Apache Httpd quite a bit, actually. Alongside haproxy, that is. The thing I appreciate about Apache is its modular layout. With Nginx I often run into a use case where I need to recompile stuff, something that never happened to me with Apache Httpd.
Re:The long life of Apache httpd 2.4 by gtirloni on Saturday May 20, 2023 @05:39AM (#36010532)
> often run into a use case where I need to recompile

Which use case is that?

Re:The long life of Apache httpd 2.4 by stevefan1999 on Saturday May 20, 2023 @06:04AM (#36010614)
for example geoip2 support
Re:The long life of Apache httpd 2.4 by ilyt on Saturday May 20, 2023 @08:03AM (#36011177)
Debian have it pre-packaged as nginx module.
Re:The long life of Apache httpd 2.4 by tecleandor on Saturday May 20, 2023 @06:32AM (#36010707)
Note, just in case, that nginx already has support for dynamic modules, and you don't have to rebuild it to add functionality.
Re:The long life of Apache httpd 2.4 by ape4 on Saturday May 20, 2023 @06:05AM (#36010617)
Nginx has a Russian connection. Wikipedia: On 12 December 2019, it was reported that the Moscow offices of Nginx Inc. had been raided by police, and that Sysoev and Konovalov had been detained.
Re:The long life of Apache httpd 2.4 by cies on Saturday May 20, 2023 @06:20AM (#36010667)
Yes. Nginx was forked from Apache by a Russian programmer.

What do you try to imply with your statement?

FLOSS licenses allow software to be used for any purpose. This is a good thing, after seeing lists of "undesireable countries" in EULAs.

Re:The long life of Apache httpd 2.4 by formerly_proven on Saturday May 20, 2023 @06:50AM (#36010781)
> Nginx was forked from Apache

Source? I fail to see any similarities between the two.

Re:The long life of Apache httpd 2.4 by cies on Sunday May 21, 2023 @05:15AM (#36019167)
https://lwn.net/Articles/700060/

https://news.ycombinator.com/item?id=520077

Was it not? I find it hard to find sources, but I realllllly remember it started off as a heavily modified fork of Apache 1.3.

Re:The long life of Apache httpd 2.4 by formerly_proven on Sunday May 21, 2023 @05:36AM (#36019271)
Well both of those are some guy (maybe even the same person...) saying it's an Apache 1.3 fork without copyright notices. On the other hand the full revision history is available and even linked in your first link. Also https://forum.nginx.org/read.php?29,207540,207585

> nginx is not Apache fork. I know well enough Apache 1.3 and I've got some ideas from Apache such as memory pools, configuration methods, processing phases, etc., but there is no line of Apache code. As to OCSP, I'm going to implement it in the next 2.0 version.

edit: Assuming "brianm" is Brian McCallister, he would be a former ASF board member. If "jimjag" is Jim Jagielski, that would be one of the ASF founders.

Re:The long life of Apache httpd 2.4 by slt2021 on Sunday May 21, 2023 @08:54PM (#36026192)
these people are jealous that nginx was acquired by F5 for whopping $670 million, which is more like $800+ mlns in today's money.

not a bad sum for apache 1.3 fork...

Re:The long life of Apache httpd 2.4 by slt2021 on Sunday May 21, 2023 @02:40PM (#36023623)
Read interview from Sysoev himself about how nginx started

https://xakep.ru/2019/12/13/nginx-interview/

Re:The long life of Apache httpd 2.4 by wildylion on Tuesday May 23, 2023 @01:23PM (#36047608)
Not forked, but written from scratch and was used at Rambler at the time.

In 2019, Rambler tried to take over Nginx claiming dubious copyright infringement, putting the main author [https://en.wikipedia.org/wiki/Igor_Sysoev|Igor Sysoev(w)] at risk.

Re:The long life of Apache httpd 2.4 by citrin_ru on Saturday May 20, 2023 @06:59AM (#36010833)
It was not a fork. Some ideas from apache which were good can be found in nginx (as well as many other web-servers), but not the code. Also nginx architecture is fundamentally different from apache of that time (pre event mpm).
Re:The long life of Apache httpd 2.4 by cies on Sunday May 21, 2023 @05:13AM (#36019158)
https://lwn.net/Articles/700060/

https://news.ycombinator.com/item?id=520077

Was it not? I find it hard to find sources, but I realllllly remember it started off as a heavily modified fork of Apache 1.3.

Re:The long life of Apache httpd 2.4 by reaperducer on Saturday May 20, 2023 @07:37AM (#36011024)
Yes. Nginx was forked from Apache by a Russian programmer. What do you try to imply with your statement?

I don't know that he was trying to imply anything. But I find it useful information, since there are lots of companies with IT Security departments that will more heavily scrutinized software based on its geographic origin.

When I joined my company, one of the first things I was tasked with was determining the origin of all of the software installed by my predecessor. Some of it got chucked out because it was from certain places.

And this was looong before anyone started dropping bombs in Kyiv.

It's not weird for a company in the UK to favor UK software, or a company in Japan to favor Japanese software, etc.

Re:The long life of Apache httpd 2.4 by ogurechny on Saturday May 20, 2023 @10:29AM (#36012209)
7 out of 10 tick mark checker specialists chose SolarWinds®™!
Re:The long life of Apache httpd 2.4 by slt2021 on Saturday May 20, 2023 @03:27PM (#36014805)
How can you write such nonsense with such a strong convincing tone?

Did you learn from chatGPT how to convicingly tell completely made up and false information?

Re:The long life of Apache httpd 2.4 by cies on Sunday May 21, 2023 @05:16AM (#36019168)
> How can you write such nonsense with such a strong convincing tone?

What part do you think is wrong? I must say you are quite creative with insults. Great skill!

https://lwn.net/Articles/700060/

https://news.ycombinator.com/item?id=520077

Re:The long life of Apache httpd 2.4 by slt2021 on Sunday May 21, 2023 @02:38PM (#36023614)
Read the interview from Sysoev himself and stop spreading false information

https://xakep.ru/2019/12/13/nginx-interview/

Re:The long life of Apache httpd 2.4 by lionkor on Saturday May 20, 2023 @07:40AM (#36011039)
I fail to see why this matters to choosing nginx or apache
Re:The long life of Apache httpd 2.4 by red_trumpet on Saturday May 20, 2023 @08:05AM (#36011195)
I guess that depends on your level of paranoia. If Russian intelligence services have access to the repos, they could put malicious code into nginx.
Re:The long life of Apache httpd 2.4 by 5e92cb50239222b on Saturday May 20, 2023 @08:10AM (#36011228)
It has belonged to an American company called F5 for years now. You should look for those evil Russians under your bed, I hear they like to hide there too.
Re:The long life of Apache httpd 2.4 by nurettin on Saturday May 20, 2023 @09:36AM (#36011831)
Those are probably the good Russians, hiding from the evil ones.
Re:The long life of Apache httpd 2.4 by foverzar on Saturday May 20, 2023 @10:38AM (#36012283)
That's kind of racist, tbh.
Re:The long life of Apache httpd 2.4 by nurettin on Saturday May 20, 2023 @01:43PM (#36013952)
Russian is not a race, but if it makes you uncomfortable, replace with whatever nationality you like.
Re:The long life of Apache httpd 2.4 by foverzar on Saturday May 20, 2023 @09:30PM (#36017175)
"Nationalistic" maybe?

Antisemitism is often referred to as "racism" and the specific domain of the word "Russian" is varied from person to person, so thanks for nitpick I guess?

In any case, I was referring to that specific "evil ${ethnicity/nationality/culture}" trope, tracing back to the day when Belarus and Ukraine had also been referred to as "Russians"

> replace with whatever nationality you like.

It has a ring of "evil Jews" to it. That's the replacement placeholder I use as a benchmark of wether something is appropriate to say out-loud.

Re:The long life of Apache httpd 2.4 by lionkor on Saturday May 20, 2023 @01:12PM (#36013679)
I went to Russia during the war multiple times, lived with Russians in their homes, ate their food, talked to them - and obviously committed my code and worked on my projects with their internet. I used their delivery service(s), their taxi service, use their music streaming service, and so on.

Not ONCE have I had any negative experience, invasion of my privacy, with any russian product.

The only negativity I experienced was caused by services I pay for (as a German) being blocked because I was in Russia.

I strongly urge people to reconsider that the Russian people are not evil, and that Russian intelligence services do not give a fuck about random people using services in Russia. Now consider that Nginx is not in Russia, its open source, and quickly it becomes clear that this whole discussion is motivated only by a boogie-man type fearmongering and nothing else.

You should be much more afraid of any tech that isnt open source, that you use, than this.

Apologies for the tone - I am just very sick and tired of this kind of talk, and as a German it reminds me of what we read in our own history books about inducing fear based on where one is from.

Re:The long life of Apache httpd 2.4 by TylerE on Saturday May 20, 2023 @05:37PM (#36015846)
How would you know if they had?
Re:The long life of Apache httpd 2.4 by lionkor on Sunday May 21, 2023 @04:54AM (#36019072)
Innocent until proven guilty vanishes from people's minds as soon as its mildly inconvenient
Re:The long life of Apache httpd 2.4 by elzbardico on Saturday May 20, 2023 @11:00AM (#36012467)
There are plenty of Russian-born programmers in the US. Aren't you afraid some of them may be KGB agents? Sergey Brin is a very suspect name by the way. Let's call Senator McCarthy's office to talk about this Russian menace.
Re:The long life of Apache httpd 2.4 by slt2021 on Saturday May 20, 2023 @03:01PM (#36014613)
^above is ChatGPT style output: found mention of Russia in nginx’s wikipedia and immediately made conclusions (c)

Very sad times await us if people will start forming their opinions based On what chatgpt hallucinates to them or what they find from quick skim of wikipedia page

Guess what, ape: Google has russian connection too (Sergey Brin) and even your chemistry books have russian connection (Mendeleev)

Re:The long life of Apache httpd 2.4 by networked on Saturday May 20, 2023 @06:47AM (#36010768)
I started using Apache again in 2019. I wanted to set up WebDAV file sharing on my home network, and Apache's implementation of WebDAV was more compatible than nginx's. Even with https://github.com/arut/nginx-dav-ext-module, I had problems with Windows clients on nginx. Caddy 2, my go-to HTTP server, lacked a WebDAV plugin at the time. So I tried Apache, and WebDAV worked everywhere. (Since then https://github.com/mholt/caddy-webdav has come out for Caddy. I plan to test it for compatibility, but I am happy with Apache and don't see a need to migrate.)

While setting up Apache 2.4, I came to like certain things about it. For example, https://httpd.apache.org/docs/2.4/mod/mod_macro.html. Configuration seems in general less footgun-y than that of nginx (see https://news.ycombinator.com/item?id=30435282). I have also adopted https://tcl.apache.org/rivet/ and use it on the LAN server where someone else might reach for PHP. It is admittedly quite niche.

Re:The long life of Apache httpd 2.4 by mikepurvis on Saturday May 20, 2023 @08:11AM (#36011238)
The only time in the last ten years that I've reached for Apache was when I needed to put an LDAP auth reverse proxy on something— it looked like it was possible to do it with nginx, but would require running a separate script or dealing with Lua or something. On Apache it was batteries-included and a few lines of pasted-in config file.

I'd love to be shown a better way on that, but Apache did rack up a W for that one use case.

Re:The long life of Apache httpd 2.4 by grepfru_it on Saturday May 20, 2023 @10:18AM (#36012123)
Traefik, bruv
Re:The long life of Apache httpd 2.4 by jacooper on Saturday May 20, 2023 @12:33PM (#36013321)
Caddy, hands down the most sane webserver config for a reverse proxy.
Re:The long life of Apache httpd 2.4 by mikepurvis on Saturday May 20, 2023 @05:12PM (#36015677)
Thanks! That does look pretty reasonable: https://authp.github.io/docs/authenticate/ldap/ldap
Re:The long life of Apache httpd 2.4 by pfsalter on Saturday May 20, 2023 @03:22PM (#36014767)
I often find random parts of nginx hidden behind their paywall, and then I'll reach for Apache. Especially when creating load balancers
Re:The long life of Apache httpd 2.4 by paulddraper on Saturday May 20, 2023 @04:05PM (#36015084)
If you're on Linux, you could use haproxy
Re:The long life of Apache httpd 2.4 by networked on Sunday May 21, 2023 @09:30AM (#36020666)
I got the Caddy part quite wrong. Let me correct myself.

> Since then https://github.com/mholt/caddy-webdav has come out for Caddy.

It turns out that Matt Holt published the WebDAV plugin a short time before the launch of Caddy 2. I didn't know this. I only found out about the plugin later.

> Caddy 2, my go-to HTTP server, lacked a WebDAV plugin at the time.

It wasn't, and it didn't. This was in 2019, and Caddy 2 launched in 2020. I was still only using Caddy 1 when I tested nginx and then Apache. Caddy 1 actually had an unofficial WebDAV plugin, https://github.com/hacdias/caddy-v1-webdav, which I remember finding a compatibility reason to not use.

Re:The long life of Apache httpd 2.4 by unixhero on Saturday May 20, 2023 @07:11AM (#36010899)
Unless you're from Canada, Alaska or Norway this saying will make absolute no sense to anyone:

> like fresh snow under foehn

Re:The long life of Apache httpd 2.4 by tetha on Saturday May 20, 2023 @07:14AM (#36010925)
Works for Germany too, since a Föhn is either a kind of warm wind, or a hair dryer.
Re:The long life of Apache httpd 2.4 by johannes1234321 on Saturday May 20, 2023 @07:58AM (#36011144)
The hairdryer is the Fön without h.
Re:The long life of Apache httpd 2.4 by aristidb on Saturday May 20, 2023 @08:42AM (#36011440)
Since the spelling reform of 1996 both are spelled Föhn
Re:The long life of Apache httpd 2.4 by Biganon on Saturday May 20, 2023 @09:11AM (#36011665)
Same in Switzerland, even in the French speaking part
Re:The long life of Apache httpd 2.4 by edwinjm on Saturday May 20, 2023 @03:14PM (#36014712)
Same for Dutch. It's the common name for a hair dryer.
Re:The long life of Apache httpd 2.4 by madduci on Saturday May 20, 2023 @07:15AM (#36010932)
You get it also under the Alps
Re:The long life of Apache httpd 2.4 by greggyb on Saturday May 20, 2023 @08:30AM (#36011368)
"Fohn" is an English word directly derived from "foehn".

I am from none of those places, speak no relevant languages other than English, and I had no trouble with the phrase in question.

I appreciate your effort in trying to stick up for me, though (: Perhaps if you want to be more helpful for those people who do conform to your assumptions, you could share a definition, in addition to your criticism.

"Fohn, an Englosh derivate of 'foehn', means 'a warm, dry wind', and is known for being particularly effective at melting snow."

Re:The long life of Apache httpd 2.4 by Macha on Saturday May 20, 2023 @09:37AM (#36011832)
I am from a native English speaking country and I had never heard the word foehn or fohn in my life, so assumed it was a typo of foot.

Which coincidentally happens to have a similar contention as standing on fresh snow compacts it, but only from the comments did I guess it was supposed to be a melting analogy.

Re:The long life of Apache httpd 2.4 by jhoechtl on Saturday May 20, 2023 @04:15PM (#36015158)
In German its Föhn which can be written as Foehn
Re:The long life of Apache httpd 2.4 by zht on Saturday May 20, 2023 @09:01AM (#36011586)
I am from Canada and I have no idea what this means
Re:The long life of Apache httpd 2.4 by VancouverMan on Saturday May 20, 2023 @09:42AM (#36011870)
"Chinook" is the term I've heard used for this.

https://en.wikipedia.org/wiki/Chinook_wind

Re:The long life of Apache httpd 2.4 by cratermoon on Saturday May 20, 2023 @11:07AM (#36012521)
In southern California they call them Santa Ana winds.
Re:The long life of Apache httpd 2.4 by cratermoon on Saturday May 20, 2023 @11:06AM (#36012506)
I had to look it up. I like the word.
Re:The long life of Apache httpd 2.4 by chha on Sunday May 21, 2023 @01:58PM (#36023270)
Norway here, but I didn’t get it. First guess was that foehn meant foot/feet, but I was way off according to the other comments
Re:The long life of Apache httpd 2.4 by ilyt on Saturday May 20, 2023 @08:02AM (#36011167)
We only use it for badly designed software that uses mod_rewrite rules as integral part of the application and not just "set those 3 rules to direct it to the entry point".
Re:The long life of Apache httpd 2.4 by slim on Saturday May 20, 2023 @11:44AM (#36012857)
some peoples badly designed software is other peoples micro services
Re:The long life of Apache httpd 2.4 by ilyt on Saturday May 20, 2023 @03:05PM (#36014644)
The problem with mod_rewrite rules is that:

* applications are built to change them dynamically, making them part of application code, instead of you know... just having proper request router in app

* It is not "enter URL in, get rewritten URL out". You can do conditionals based on existence of files and a bunch of other stuff which means it can't be isolated from the app overusing it easily

Rewriting on loadbalancer to mangle some paths is to be avoided but overall not too bad to manage but what can happen in mod_rewrite by badly designed apps make app basically glued in into apache.

Re:The long life of Apache httpd 2.4 by Thaxll on Saturday May 20, 2023 @08:09AM (#36011225)
Before nginx there was lighttpd that was pretty much what Nginx would be later on.
Re:The long life of Apache httpd 2.4 by ceeam on Saturday May 20, 2023 @09:08AM (#36011639)
I still use Lighttpd. My weird idea why Lighty lost the war is that it had somewhat unorthodox rewrite rules, namely this one line in mod_rewrite.c:

if (st && S_ISREG(st->st_mode)) return HANDLER_GO_ON;

Change it to if (st) without a regular file check, and it works as expected (great) with frameworks like Joomla etc (/administrator URLs, for example)

Re:The long life of Apache httpd 2.4 by toast0 on Saturday May 20, 2023 @12:25PM (#36013251)
I used lighttpd for my previous job because the boss liked. The config language was definitely weird. I had to do a lot of fixups when someone made a well meaning change that didn't work properly because of how conditionals work. Usually informed by experience from when the someone was me.
Re:The long life of Apache httpd 2.4 by Blackthorn on Saturday May 20, 2023 @12:35PM (#36013335)
I personally ditched lighttpd on my own website (PHP, large traffic, but only a single server) because it had some memory leak that would, over time, result in increasing memory usage and eventually cause the server to chug.

It had not seen any bugfix releases for quite a long time at that point, and nginx was available by then, so I made the swap. I continued to serve that website off of a single server for the rest of its lifetime.

Re:The long life of Apache httpd 2.4 by blacklion on Saturday May 20, 2023 @03:02PM (#36014625)
Nope. lighttpd is simple and light.

nginx is very powerful and fast.

nginx could send static file with one syscall and zero-copy if OS supports it. It could exploit all system async mechanisms - POSIX AIO, kqueue, whatever you have. Linux was worst in this regards before io_uring, and FreeBSD or Solaris were much, much better platform for nginx.

For example, Igor Sysoev (mastermide behind nginx) pushed patches to FreeBSD kernel to shave off one syscall per file on this system.

Now, when everything is HTTPS, Linux have io_uring and Igor left nginx after F5 acquisition, it is not very useful - nginx is stagnating, support for KTLS is absent, support for io_uring on Linux is absent (though there are some forks and patches for this)...

But compare nginx and lighttpd is simply stupid, it is apples-to-oranges comparison.

Each one has its niche, of course.

Re:The long life of Apache httpd 2.4 by Thaxll on Sunday May 21, 2023 @04:42PM (#36024527)
lighttpd came out in the mid 2000's with a better polling model than Apache, that was my point. It was using epoll back then which Apache did not.

Even Youtube used Lighttpd at some point.

Both are http servers, and lighttpd came out before Nginx, they both tried to solve the c10k problem.

Re:The long life of Apache httpd 2.4 by truthreplicator on Saturday May 20, 2023 @10:35AM (#36012263)
The April 2023 Netcraft survey: https://news.netcraft.com/archives/category/web-server-surve...

nginx is at: 26% Apache is at 20%

It doesn't sound like nginx is even close to having this wrapped up; which is a really good thing because I've tried nginx and the config and design sucks. Apache does so many things well.

Re:The long life of Apache httpd 2.4 by cypress66 on Saturday May 20, 2023 @10:49AM (#36012371)
That's most likely all cpanel php WordPress stuff that relies on .htaccess files
Re:The long life of Apache httpd 2.4 by virtuous_signal on Saturday May 20, 2023 @11:23AM (#36012665)
That chart counts nginx and openresty as separate categories. If you combine them (which I think makes more sense, since a lot of openresty's adoption must come from ingress-nginx), nginx/openresty would be at 34%.
Re:The long life of Apache httpd 2.4 by ta1243 on Saturday May 20, 2023 @12:44PM (#36013426)
Either way I'm happy with a wide variety of products doing the job, it avoids lock-in.

Personally I use apache as I have very few users (internal facing stuff), it has a nice simple mod_auth_openidc config which remains the same from one year to the next

I do have to recompile ws_tunnel though as I proxy a broken product I proxy which doesn't accept the correct standard for camel-capped "WebSocket" -- my "fix" script runs

sed -i 's/WebSocket/websocket/g' ./modules/proxy/mod_proxy_wstunnel.c

and recompiles

Re:The long life of Apache httpd 2.4 by jgalt212 on Saturday May 20, 2023 @05:31PM (#36015803)
> As of June 2022 W3Tech's web server count of all web sites ranked Nginx first with 33.6%. Apache was second at 31.4% and Cloudflare Server third at 21.6%.

From the wiki.

Re:The long life of Apache httpd 2.4 by truthreplicator on Saturday May 20, 2023 @09:15PM (#36017104)
It's interesting, it sounds like Apache is closer than I thought. I posted Netcraft's link since I've followed them for years, I'm not as familiar with W3Tech. I can't speak to which has more reliable data but W3Tech's numbers doesn't surprise me.
Re:The long life of Apache httpd 2.4 by toast0 on Saturday May 20, 2023 @12:19PM (#36013191)
> awful Apache prefork engine

Eh, the prefork engine isn't awful. It's not without limitations, but it's an excellent fit for some loads and a bad/terrible fit for others.

The main limitations are:

The child ramping behavior: you should set MinChildren = MaxChildren = StartChildren. Ramping children on demand sounds nice, but it's easy to run out of memory when all the children start or spend too much time on childinit instead of serving requests.

Anytime the child spends connected to a client socket but not actively working. Some of this can be mitigated. Turning off http keepalive (or handling it elsewhere) and setting large socket buffers allows the server to generate a response, give it to the kernel, and move on to the next client. If you're often waiting significantly for disk i/o, Apache pre-fork isn't a good fit.

Http keep-alive is a big deal for some uses, Yahoo had a nice hack for that, which I don't think made it out: have sockets wait for complete requests in another process, and send those sockets to apache over a unix socket; after apache is done with it, send it back to the 'cheapalive' daemon. That adds a bit of complexity, and I don't know of a public implementation, so not super useful to people, but it's possible to build.

I personally think prefork apache + mod_php is simpler than some other daemon + fastcgi php. But that's debatable.

Edit: oh and one more... .htaccess is clearly a performance suck. Perhaps a useful one depending on your application, but there's good reasons nobody else does it.