Some lighttpd bitsLighttpd is a popular lightweight web server I've been experimenting with; in the process, I've wound up stumbling over various things that I should write down this time around (I played around with lighttpd about a year ago but then forgot a bunch of this stuff).
I have to say that lighttpd's configuration stuff can be a bit scary sometimes; once you start using its conditional things, it's practically a programming language. I'm more used to configuration files that don't have to be partially interpreted on every request, and thus where you can clearly see what settings are in effect. (Lighttpd allows you to set core server configuration variables
based on matching against various bits of the HTTP header. For example,
the lighttpd way of doing simple virtual hosts is to check the HTTP
It is kind of a pity that you can't take lighttpd configuration to the logical next step and write macros. I suppose you can get pretty close with include files, but you can't easily pass them arguments. Sidebar: sending a URL hierarchy to a CGIThere's at least two ways of sending an URL hierarchy to a CGI program in lighttpd; the cgi-bin way and the direct way. The cgi-bin way is to configure yourself a traditional cgi-bin directory area, and then use URL rewriting to point stuff there (ie, the traditional Apache approach transplanted). With your /cgi-bin/ stuff already configured, it looks like this:
The direct way is to send the root URL straight off to an executable without bothering to configure a generic CGI area:
It's safe to stomp all over (This sort of thing is where the configuration stuff starts turning into a programming language.) I personally prefer the direct way, because it leaves less stuff
accessible for excessively clever people. Why have an accessible set of
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |