Oh, I didn't realize that. Seems like a strange choice?
Oh, I didn't realize that. Seems like a strange choice?
I can't exactly find if it came with OS X since the beginning (which would predate nginx and friends), but it probably was a much more likely choice back in the day, and I guess that's why it's still included. Wouldn't be surprised to see it quietly disappear from later macOS releases, though.
Apache was one of the installable options alongside Emacs and WebObjects.
Apple was ahead of the curve on something that never arrived and many of us still miss.
The Apache install would obviously work over the Internet but sharing over the local network was its main purpose.
What kind of content do you think they imagined as use cases for local network http server over bonjour? Like for a small business? Or household? Or giving strangers access to something when you happened to be physically adjacent and on the same network?
It still seems like kind of evidence of a decentralized networking environment that never really came to be... bonjour in general kind of is, although it's still there and gets used for some specific things. But we have ended up doing a lot more connections "cloud-mediated" instead of peer-to-peer.
As for the use case, in the classic MacOS days and even early days of OSX the system didn't ship with support for Windows file sharing. It wasn't until IIRC Jaguar (10.2) that Samba shipped default with the system. Web sharing made for a workable lowest common denominator for getting content off a Mac to Windows. With Bonjour (in Safari) you'll see all the shares on the local network segment.
Additionally since web sharing was just Apache it shipped with a bunch of the extension modules. I believe PHP was enabled by default so you could just drop a PHP script in your Sites folder for a dynamic page. CGI was also simple to enable because thanks to all the shipped modules.
Bonjour is decidedly a local peer-to-peer discovery mechanism. Even the packets have a short TTL so they don't route beyond local segments. It's far too chatty to be a WAN discovery system.
We ended up with cloud mediated connections because of NAT and UPnP hole poking sucks. Residential routers are really shitty in general. They also don't make port forwarding easy (or possible). So a host behind a NAT router doesn't usually have good options for receiving incoming connections. That's why we've got a bunch of NAT traversal protocols and need public hosts to mediate those connections.
A friend of mine would put a "shared" Mac Mini somewhere in the office at almost every job he's ever had, "just in case". Need to let a guest browse the web? The router is failing? Transcode some media? It always came in clutch.
The people working in that office were unaware of what it did, just that it should never be turned off. ;)
The CUPS software is still available in Ventura and it comes with version 2.3.4. This version is more up-to-date compared to the latest release of CUPS from Apple on Github and it doesn't match any releases in OpenPrinting CUPS.