x86_64 is used as a baseline: the "x86_64" entry, whatever status it has,
is transformed into "all", and then the other entries in ARCHITECTURES
either dropped or rearranged appropriately.
* The modules were previously installed directly in /system/lib/.
Now the are being installed in /system/lib/apache/.
* On x86 secondary arch the modules are now being installed in
/system/lib/x86/apache/, and we can re-enable that arch.
* The "httpd.conf" file, as well as two subdirectories, "extra"
and "original", were previously installed in /system/settings/.
Now they are being installed in /system/settings/apache/.
* Several directories ("build", "cgi-bin", "error", "htdocs",
"icons" and "manual") which were previously installed in
/system/data/ are now being installed in /system/data/apache/.
Remark: Although "cgi-bin", "htdocs" and "icons" could have been
kept in /system/data/, having "build", "error" and "manual" in
/system/data/ was definitely wrong. Hence the global move.
* Move GLOBAL_WRITABLE_FILES before PROVIDES.
This brings mod_brotli and mod_md. The "managed domains" module,
mod_md, is required for integrating Let's Encrypt functionality.
Also mark x86 secondary arch as untested because the modules are
not being installed in system/lib/x86/ but in system/lib/.
getPackagePrefix makes our scripts on travis-ci.org complain:
Checking ports of: lighttpd-1.4.49
lighttpd-1.4.49 [www-servers]
packageEntries: error: "mod_geoip" doesn't seem to be
a valid package suffix.
So, instead, use a little hack.
* Do not call aclocal, autoconf and automake anymore, as this is
no longer required given that we don't need to fix Makefile.am
anymore.
* Update PROVIDES by commenting out lib:mod_authn_{gssapi,mysql},
lib:mod_mysql_vhost and lib:mod_trigger_b4_dl because 1.4.44 no
longer creates empty modules when dependencies are missing.
* Simplify the on-the-fly patch for lighttpd/conf.d/geoip.conf as
upstream now suggests GeoLiteCity.dat instead of GeoCityLite.dat.
* Inclusion of mod_geoip before mod_ssi has been applied upstream.
* This release of lighttpd comes with 7 new modules: mod_deflate,
mod_authn_{file,gssapi,ldap,mysql}, mod_uploadprogress and
mod_geoip.
* The GeoIP module is being added in a separate sub-package to limit
the dependency on the geoip package to that sub-package only.
* Add a quickstart-geoip.txt and a demo geoip page for novice users.
* In lighttpd.conf don't use paths that change when the package is
updated.
* Keep lighttpd.pid in /var/run instead of /var.
* Switch SOURCE_URI from tar.gz to tar.xz ;-)
* Configure with more options: --with-libxml --with-ldap --with-lua
--with-sqlite --with-uuid --with-webdav-locks
* Create a read-only copy of system/settings/lighttpd/ in
system/data/lighttpd/template-settings/.
* Rename index.shtml to index.lighttpd.shtml to make it easier to
share the same document-root with other web servers.
* Add quickstart.txt in $docDir with some useful information.
Use autoconf and patch configure.ac instead of configure.
Declare the recipe as also tested on x86 and x86_64.
Install default configuration (in settings/lighttpd/) with SSI enabled.
Declare data/lighttpd/www/htdocs as the document root.
Install a default index.shtml page that works if SSI is enabled.
Install a default index.lighttpd.html page that is used if SSI is disabled.
Group all modules (mod_*.so) in lib/lighttpd/ instead of installing them in lib.
Make var/log/lighttpd/ the default directory for access.log and error.log.
Remove all lib-related stuff from the devel package and, instead, add all .h files that could be required to build third-party modules in separate recipes. That lists consists of all .h files in src except these: configparser.h network.h proc_open.h request.h
Add --with-{zlib,bzip2} to configure args to enable {zlib,bzip2} support for mod_compress.
Add --with-pcre to configure args to make lighttpd understand regexps in the server configuration.
Add --with-webdav-props to configure args (as well as the required dependencies on libsqlite3 and libxml2) to enable some features of the WebDAV module.
With these changes lighttpd runs out of the box on Haiku.
Launch lighttpd with:
lighttpd -f /system/settings/lighttpd/lighttpd.conf
Monitor the access log with:
tail -f /var/log/lighttpd/access.log
Monitor the error log with:
tail -f /var/log/lighttpd/error.log
Stop lighttpd with:
kill $(cat /var/lighttpd.pid)
Notes:
To have alternate pages served instead of the default page, comment-out the active "var.server_root" line in /system/settings/lighttpd/lighttpd.conf and uncomment the inactive one at the next line, then place the alternate content in /var/www/htdocs/ and restart lighttpd.
Further changes that could be nice to make:
* Find a better way to patch configure.ac for the detection of libnetwork to make it compatible with all other platforms and then send it to upstream.
* Check if USER_SETTINGS_FILES and GLOBAL_WRITABLE_FILES could be improved. In particular, see how "template" works and provide both read-only template config files and user-modifiable "keep-old" copies.
* Check if there is a more appropriate directory for the customized default index.(s)html.
* Suggest a default location for cgi-bin scripts/runtimes.
* Add start/stop scripts and some glue to make lighttpd available as service on Haiku.
* Add glue to auto-rotate logs.
Workaround an issue about the configure script not being regenerated from configure.ac.
Instead of changing the BUILD block of the recipe, adding a tiny patch for the configure script is easy and works fine.