From personal usage

  • using webroot with certbot for https
    • requires to let /.webroot/ be acccessible and merging cat privkey.pem cert.pem > lighttpd.pem
  • allow CORS
    • setenv.add-response-header = (
              "Access-Control-Allow-Origin" => "*",
              "Access-Control-Allow-Headers" => "Content-Type, Origin, Accept, Range, Cache-Control"
      )
    • via mod_setenv
    • headers specific response important for reverse proxying and pre-fetch
  • only *.conf files get parsed in conf-enabled/
  • use mimetype.assign instead of the too generalist system-wide /etc/mime.types
  • one can't do a rewrite in a url conditional
    • $HTTP["url"] =~ "/this/" { url.rewrite = ( "/this/" => "/that/" )} will have no effect (and produce no error either)
  • debug.log-request-handling in DebugVariables
  • ModDirlisting
  • ModAuth
  • ModRedirect with url.redirect-code
  • mod_proxy
    • failed to properly limit it to one directory and probably problem with url.rewrite
  • mod_cgi
    • do not use ".cgi" => "/bin/sh" if you use Fossil with #!/usr/bin/fossil
  • lighttpd -t -f lighttpd.conf : test the syntax of the configuration file
  • lighttpd force-reload : reload lighttpd with the modified configuration file
  • mimefile type updated to use .log as plain text files
    • modify /etc/mime.types (loaded from the configuration file) to add log, pjs, ... to "text/plain" the restart httpd
  • vhost simple configuration based host=path
    • $HTTP["host"] == "www.benetou.fr" { server.document-root = "/home/utopiah/web/benetou.fr/www/" }
  • vhost with urlrewritting :
$HTTP["host"] == "blog.seedea.org" {
  index-file.names = ("pmwiki.php")
    url.rewrite-once = (
        "^/([a-zA-Z0-9]+)/([a-zA-Z=?0-9.&:\-_%]+)$" => "/wiki/pmwiki.php?n=$1.$2",
        "^/([a-zA-Z0-9/]+)$" => "/wiki/pmwiki.php?n=CoEvolutionBlog.$1",
        "^/$" => "/wiki/pmwiki.php?n=CoEvolutionBlog"
      )
    }

Apache

Moved to ApacheProjects#HTTPServer

nginx

See also


Note

My notes on Tools gather what I know or want to know. Consequently they are not and will never be complete references. For this, official manuals and online communities provide much better answers.