Daily Archives: September 19, 2008

Apache roots spread wide!

I’ve understood for some time that there’s a lot that’s recognisable as Apache HTTPD in certain other webservers, specifically lighttpd and nginx.

I’ve just followed a link from Sergio Talens-Oliag’s blog (via planet) to his new PAM authentication module for nginx.  The commonality is indeed startling: nginx has a similar basic module structure, the same configuration directives handling, configuration structure and even the same dual hierarchy, the request_rec, plus lower-level core structures like pools and tables.  And the fingerprint for (at least) request-processing functions implemented by the module is the same.

There are differences too, of course.  The module structure is split into two, and stripped of Apache 1’s phases.  Rather than Apache 2’s hooks, the phases reappear as something exported by an nginx core module.  At first glance, this looks like broadly similar flexibility to hooks, though the module has to see the core module struct to register a processing function, creating an interdependence that could threaten modular design, especially if a module were to try to emulate optional hooks.

It looks like a fork from Apache 1 (in much the same sense as Apache 2 is): a new server, but one that reuses a lot of what the Apache 1 offered, and builds on it.  Perhaps that’s also just as the original Apache was itself derived from the old NCSA server.  A corollary is that both application programming and sysop skills should be largely transferable between the different servers, with a quick&easy learning curve.


Get every new post delivered to your Inbox.

Join 108 other followers