Set custom Lighttpd configuration file
pliusnin opened this issue ยท 4 comments
Seems like it's not possible to set up server with custom configuration. Would you able to extend server config with ability to define lighttpd config file?
Yeah, the idea to allow for a custom Lighttpd config, I have it for a while (see #13). To do it correctly, it requires some re-design of the existing API... I think splitting current Server class implementation into two, one BaseServer which works with an arbitrary config file, and then Server class extending it, with all methods and stuff that rely on the actual config content. But then... if one wants a custom config, I presume he also wants to use additional Lighttpd modules, so it requires to check these modules can be build for target platforms and opted-in to be used; it requires documentation updates; and thus it starts to feel as a big undertaking... which I can perfectly do if somebody funds it, but otherwise I don't need it myself for my ongoing goals, thus don't see me investing my own resources into working on it otherwise.
An easier alternative, if small additions / alterations in the current config work for you, we can expose them through some additional options of Server constructor. Similar to how I did to rapidly allow for opting-in for WebDAV module in the last release.
Aside: Regarding the current config: lighttpd 1.4.71 provides some common values by default for mimetype.assign
, if not specified (lighttpd/lighttpd1.4@532a3c0), and lighttpd 1.4.72 will expand that a bit (lighttpd/lighttpd1.4@8545036).
In the vein of simpler configs, you might want to review what lighttpd now provides and consider removing your overwrite in the current config
@pliusnin: On a second thought, in v0.9.0 I just added extraConfig
option to Server constructor, which allows to append arbitrary Lighttpd configuration to the base one created by the library.
Thanks @birdofpreyru , I'll check it out a bit later ๐