Download raw body.
UPDATE: lighttpd 1.4.82
Here is an update to lighttpd 1.4.82.
I am moving the config file into a subdir and setting things up
to use the example configuration bits provided by upstream. Getting
rid of the sloppy example config tacked on the side in the port.
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/lighttpd/Makefile,v
retrieving revision 1.183
diff -u -p -u -p -r1.183 Makefile
--- Makefile 28 Jan 2025 11:22:04 -0000 1.183
+++ Makefile 21 Feb 2026 04:36:24 -0000
@@ -1,7 +1,6 @@
COMMENT= secure, fast, compliant, and very flexible web-server
-DISTNAME= lighttpd-1.4.76
-REVISION= 0
+DISTNAME= lighttpd-1.4.82
CATEGORIES= www net
SITES= https://download.lighttpd.net/lighttpd/releases-1.4.x/
EXTRACT_SUFX= .tar.xz
@@ -54,21 +53,27 @@ WANTLIB+= pq
CFLAGS+= -I${LOCALBASE}/include
MODCMAKE_LDFLAGS+= -L${LOCALBASE}/lib
-post-extract:
- @cp -f ${FILESDIR}/lighttpd.conf ${WRKSRC}/doc
-
pre-build:
- @${SUBST_CMD} ${WRKSRC}/doc/lighttpd.conf ${WRKSRC}/doc/lighttpd.8
+ @${SUBST_CMD} ${WRKSRC}/doc/lighttpd.8 \
+ ${WRKSRC}/doc/config/conf.d/cgi.conf
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/lighttpd
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lighttpd
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lighttpd/conf.d
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/lighttpd/vhosts.d
${INSTALL_DATA} ${WRKSRC}/doc/outdated/*.txt \
${PREFIX}/share/doc/lighttpd
- ${INSTALL_DATA} ${WRKSRC}/doc/lighttpd.conf \
+ ${INSTALL_DATA} ${WRKSRC}/doc/config/lighttpd.conf \
+ ${PREFIX}/share/examples/lighttpd
+ ${INSTALL_DATA} ${WRKSRC}/doc/config/lighttpd.annotated.conf \
${PREFIX}/share/examples/lighttpd
- ${INSTALL_DATA} ${WRKSRC}/doc/scripts/spawn-php.sh \
+ ${INSTALL_DATA} ${WRKSRC}/doc/config/modules.conf \
${PREFIX}/share/examples/lighttpd
+ ${INSTALL_DATA} ${WRKSRC}/doc/config/conf.d/*.conf \
+ ${PREFIX}/share/examples/lighttpd/conf.d
+ ${INSTALL_DATA} ${WRKSRC}/doc/config/vhosts.d/vhosts.template \
+ ${PREFIX}/share/examples/lighttpd/vhosts.d
${INSTALL_DATA} /dev/null \
${PREFIX}/share/examples/lighttpd/access.log
${INSTALL_DATA} /dev/null \
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/lighttpd/distinfo,v
retrieving revision 1.76
diff -u -p -u -p -r1.76 distinfo
--- distinfo 13 Apr 2024 06:39:34 -0000 1.76
+++ distinfo 21 Feb 2026 04:36:24 -0000
@@ -1,2 +1,2 @@
-SHA256 (lighttpd-1.4.76.tar.xz) = jL9CluNzz9DO3+nZeHYLWwXFj9xASLTivK8KYayPUBE=
-SIZE (lighttpd-1.4.76.tar.xz) = 847132
+SHA256 (lighttpd-1.4.82.tar.xz) = q/50OR+cvWarFU6gfmTxlNvn6QbvTtR+s7DztGJGyWI=
+SIZE (lighttpd-1.4.82.tar.xz) = 883352
Index: files/lighttpd.conf
===================================================================
RCS file: files/lighttpd.conf
diff -N files/lighttpd.conf
--- files/lighttpd.conf 7 Jan 2023 11:30:39 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,307 +0,0 @@
-# lighttpd configuration file
-
-############ Options you really have to take care of ####################
-
-## modules to load
-# at least mod_access and mod_accesslog should be loaded
-# all other module should only be loaded if really neccesary
-# - saves some time
-# - saves memory
-server.modules = (
-# "mod_rewrite",
-# "mod_redirect",
-# "mod_alias",
- "mod_access",
-# "mod_trigger_b4_dl",
-# "mod_auth",
-# "mod_status",
-# "mod_setenv",
-# "mod_fastcgi",
-# "mod_proxy",
-# "mod_simple_vhost",
-# "mod_evhost",
-# "mod_userdir",
-# "mod_cgi",
-# "mod_deflate",
-# "mod_ssi",
-# "mod_expire",
-# "mod_rrdtool",
- "mod_accesslog" )
-
-## A static document-root. For virtual hosting take a look at the
-## mod_simple_vhost module.
-server.document-root = "htdocs/"
-
-#### accesslog module
-accesslog.filename = "logs/access.log"
-
-## where to send error-messages to
-server.errorlog = "logs/error.log"
-
-# files to check for if .../ is requested
-index-file.names = ( "index.html", "index.htm", "default.htm" )
-
-server.event-handler = "kqueue"
-server.network-backend = "writev"
-
-server.bind = "0.0.0.0"
-server.port = "80"
-
-$SERVER["socket"] == "[::]:80" { }
-
-# mimetype mapping
-mimetype.assign = (
- ".pdf" => "application/pdf",
- ".sig" => "application/pgp-signature",
- ".spl" => "application/futuresplash",
- ".class" => "application/octet-stream",
- ".ps" => "application/postscript",
- ".torrent" => "application/x-bittorrent",
- ".dvi" => "application/x-dvi",
- ".gz" => "application/x-gzip",
- ".pac" => "application/x-ns-proxy-autoconfig",
- ".swf" => "application/x-shockwave-flash",
- ".tar.gz" => "application/x-tgz",
- ".tgz" => "application/x-tgz",
- ".tar" => "application/x-tar",
- ".zip" => "application/zip",
- ".mp3" => "audio/mpeg",
- ".m3u" => "audio/x-mpegurl",
- ".wma" => "audio/x-ms-wma",
- ".wax" => "audio/x-ms-wax",
- ".ogg" => "application/ogg",
- ".wav" => "audio/x-wav",
- ".gif" => "image/gif",
- ".jar" => "application/x-java-archive",
- ".jpg" => "image/jpeg",
- ".jpeg" => "image/jpeg",
- ".png" => "image/png",
- ".xbm" => "image/x-xbitmap",
- ".xpm" => "image/x-xpixmap",
- ".xwd" => "image/x-xwindowdump",
- ".css" => "text/css",
- ".html" => "text/html",
- ".htm" => "text/html",
- ".js" => "text/javascript",
- ".asc" => "text/plain",
- ".c" => "text/plain",
- ".cpp" => "text/plain",
- ".log" => "text/plain",
- ".conf" => "text/plain",
- ".text" => "text/plain",
- ".txt" => "text/plain",
- ".dtd" => "text/xml",
- ".xml" => "text/xml",
- ".mpeg" => "video/mpeg",
- ".mpg" => "video/mpeg",
- ".mov" => "video/quicktime",
- ".qt" => "video/quicktime",
- ".avi" => "video/x-msvideo",
- ".asf" => "video/x-ms-asf",
- ".asx" => "video/x-ms-asf",
- ".wmv" => "video/x-ms-wmv",
- ".bz2" => "application/x-bzip",
- ".tbz" => "application/x-bzip-compressed-tar",
- ".tar.bz2" => "application/x-bzip-compressed-tar",
- # default mime type
- "" => "application/octet-stream",
- )
-
-# Use the "Content-Type" extended attribute to obtain mime type if possible
-#mimetype.use-xattr = "enable"
-
-## send a different Server: header
-## be nice and keep it at lighttpd
-# server.tag = "lighttpd"
-
-## deny access the file-extensions
-#
-# ~ is for backupfiles from vi, emacs, joe, ...
-# .inc is often used for code includes which should in general not be part
-# of the document-root
-url.access-deny = ( "~", ".inc" )
-
-$HTTP["url"] =~ "\.pdf$" {
- server.range-requests = "disable"
-}
-
-##
-# which extensions should not be handle via static-file transfer
-#
-# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
-static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
-
-######### Options that are good to be but not neccesary to be changed #######
-
-## error-handler for status 404
-#server.error-handler-404 = "/error-handler.html"
-#server.error-handler-404 = "/error-handler.php"
-
-## to help the rc.scripts
-server.pid-file = "/var/run/lighttpd.pid"
-
-###### virtual hosts
-##
-## If you want name-based virtual hosting add the next three settings and load
-## mod_simple_vhost
-##
-## document-root =
-## virtual-server-root + virtual-server-default-host + virtual-server-docroot
-## or
-## virtual-server-root + http-host + virtual-server-docroot
-##
-#simple-vhost.server-root = "/srv/www/vhosts/"
-#simple-vhost.default-host = "www.example.org"
-#simple-vhost.document-root = "/htdocs/"
-
-
-##
-## Format: <errorfile-prefix><status-code>.html
-## -> ..../status-404.html for 'File not found'
-#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
-#server.errorfile-prefix = "/srv/www/errors/status-"
-
-## virtual directory listings
-#dir-listing.activate = "enable"
-## select encoding for directory listings
-#dir-listing.encoding = "utf-8"
-
-## enable debugging
-#debug.log-request-header = "enable"
-#debug.log-response-header = "enable"
-#debug.log-request-handling = "enable"
-#debug.log-file-not-found = "enable"
-
-# chroot() to directory
-server.chroot = "/var/www/"
-
-server.username = "_lighttpd"
-server.groupname = "_lighttpd"
-
-#### compress module
-#compress.cache-dir = "/var/cache/lighttpd/compress/"
-#compress.filetype = ("text/plain", "text/html")
-
-#### proxy module
-## read proxy.txt for more info
-#proxy.server = ( ".php" =>
-# ( "localhost" =>
-# (
-# "host" => "192.168.0.101",
-# "port" => 80
-# )
-# )
-# )
-
-#### fastcgi module
-## read fastcgi.txt for more info
-## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
-#fastcgi.server = ( ".php" =>
-# ( "localhost" =>
-# (
-# "socket" => "/var/run/lighttpd/php-fastcgi.socket",
-# "bin-path" => "/usr/local/bin/php-cgi"
-# )
-# )
-# )
-
-#### CGI module
-#cgi.assign = ( ".pl" => "/usr/bin/perl",
-# ".cgi" => "/usr/bin/perl" )
-#
-
-#### SSL engine
-#ssl.engine = "enable"
-#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
-
-#### status module
-#status.status-url = "/server-status"
-#status.config-url = "/server-config"
-
-#### auth module
-## read authentication.txt for more info
-#auth.backend = "plain"
-#auth.backend.plain.userfile = "lighttpd.user"
-#auth.backend.plain.groupfile = "lighttpd.group"
-
-#auth.backend.ldap.hostname = "localhost"
-#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
-#auth.backend.ldap.filter = "(uid=$)"
-
-#auth.require = ( "/server-status" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "user=jan"
-# ),
-# "/server-config" =>
-# (
-# "method" => "digest",
-# "realm" => "download archiv",
-# "require" => "valid-user"
-# )
-# )
-
-#### url handling modules (rewrite, redirect, access)
-#url.rewrite = ( "^/$" => "/server-status" )
-#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
-#### both rewrite/redirect support back reference to regex conditional using %n
-#$HTTP["host"] =~ "^www\.(.*)" {
-# url.redirect = ( "^/(.*)" => "http://%1/$1" )
-#}
-
-#
-# define a pattern for the host url finding
-# %% => % sign
-# %0 => domain name + tld
-# %1 => tld
-# %2 => domain name without tld
-# %3 => subdomain 1 name
-# %4 => subdomain 2 name
-#
-#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"
-
-#### expire module
-#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
-
-#### ssi
-#ssi.extension = ( ".shtml" )
-
-#### rrdtool
-#rrdtool.binary = "${LOCALBASE}/bin/rrdtool"
-#rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"
-
-#### setenv
-#setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
-#setenv.add-response-header = ( "X-Secret-Message" => "42" )
-
-## for mod_trigger_b4_dl
-# trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
-# trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
-# trigger-before-download.trigger-url = "^/trigger/"
-# trigger-before-download.download-url = "^/download/"
-# trigger-before-download.deny-url = "http://127.0.0.1/index.html"
-# trigger-before-download.trigger-timeout = 10
-
-#### variable usage:
-## variable name without "." is auto prefixed by "var." and becomes "var.bar"
-#bar = 1
-#var.mystring = "foo"
-
-## integer add
-#bar += 1
-## string concat, with integer cast as string, result: "www.foo1.com"
-#server.name = "www." + mystring + var.bar + ".com"
-## array merge
-#index-file.names = (foo + ".php") + index-file.names
-#index-file.names += (foo + ".php")
-
-#### include
-#include /etc/lighttpd/lighttpd-inc.conf
-## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
-#include "lighttpd-inc.conf"
-
-#### include_shell
-#include_shell "echo var.a=1"
-## the above is same as:
-#var.a=1
Index: patches/patch-doc_config_conf_d_cgi_conf
===================================================================
RCS file: patches/patch-doc_config_conf_d_cgi_conf
diff -N patches/patch-doc_config_conf_d_cgi_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_config_conf_d_cgi_conf 21 Feb 2026 04:36:24 -0000
@@ -0,0 +1,12 @@
+Index: doc/config/conf.d/cgi.conf
+--- doc/config/conf.d/cgi.conf.orig
++++ doc/config/conf.d/cgi.conf
+@@ -16,7 +16,7 @@ cgi.assign = ( ".pl" => "/usr/bin/per
+ ".cgi" => "/usr/bin/perl",
+ ".rb" => "/usr/bin/ruby",
+ ".erb" => "/usr/bin/eruby",
+- ".py" => "/usr/bin/python" )
++ ".py" => "${LOCALBASE}/bin/python3" )
+
+ ##
+ ## to get the old cgi-bin behavior of apache
Index: patches/patch-doc_config_lighttpd_annotated_conf
===================================================================
RCS file: patches/patch-doc_config_lighttpd_annotated_conf
diff -N patches/patch-doc_config_lighttpd_annotated_conf
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_config_lighttpd_annotated_conf 21 Feb 2026 04:36:24 -0000
@@ -0,0 +1,49 @@
+Index: doc/config/lighttpd.annotated.conf
+--- doc/config/lighttpd.annotated.conf.orig
++++ doc/config/lighttpd.annotated.conf
+@@ -13,11 +13,11 @@
+ ## if you add a variable here. Add the corresponding variable in the
+ ## chroot example as well.
+ ##
+-var.log_root = "/var/log/lighttpd"
+-var.server_root = "/srv/www"
+-var.state_dir = "/run"
+-var.home_dir = "/var/lib/lighttpd"
+-var.conf_dir = "/etc/lighttpd"
++#var.log_root = "/var/log/lighttpd"
++#var.server_root = "/srv/www"
++#var.state_dir = "/run"
++#var.home_dir = "/var/lib/lighttpd"
++#var.conf_dir = "/etc/lighttpd"
+
+ ##
+ ## run the server chrooted.
+@@ -29,14 +29,14 @@ var.conf_dir = "/etc/lighttpd"
+ ##
+ ## example chroot configuration:
+ ##
+-#var.log_root = "/logs"
++var.log_root = "/logs"
+ #var.server_root = "/"
+-#var.state_dir = "/run"
++var.state_dir = "/run"
+ #var.home_dir = "/lib/lighttpd"
+ #var.vhosts_dir = "/vhosts"
+ #var.conf_dir = "/etc"
+ #
+-#server.chroot = "/srv/www"
++server.chroot = "/var/www"
+
+ ##
+ ## Some additional variables to make the configuration easier
+@@ -97,8 +97,8 @@ include conf_dir + "/modules.conf"
+ ## Run as a different username/groupname.
+ ## This requires root permissions during startup.
+ ##
+-server.username = "lighttpd"
+-server.groupname = "lighttpd"
++server.username = "_lighttpd"
++server.groupname = "_lighttpd"
+
+ ##
+ ## Enable lighttpd to serve requests on sockets received from systemd
Index: patches/patch-doc_lighttpd_8
===================================================================
RCS file: /cvs/ports/www/lighttpd/patches/patch-doc_lighttpd_8,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-doc_lighttpd_8
--- patches/patch-doc_lighttpd_8 11 Mar 2022 20:10:04 -0000 1.5
+++ patches/patch-doc_lighttpd_8 21 Feb 2026 04:36:24 -0000
@@ -1,12 +1,12 @@
Index: doc/lighttpd.8
--- doc/lighttpd.8.orig
+++ doc/lighttpd.8
-@@ -56,7 +56,7 @@ Show a brief help message and exit.
+@@ -58,7 +58,7 @@ Show a brief help message and exit.
.
.SH FILES
.TP 8
-/etc/lighttpd/lighttpd.conf
-+${SYSCONFDIR}/lighttpd.conf
++${SYSCONFDIR}/lighttpd/lighttpd.conf
The standard location for the configuration file.
.TP 8
/run/lighttpd.pid
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/lighttpd/pkg/PLIST,v
retrieving revision 1.35
diff -u -p -u -p -r1.35 PLIST
--- pkg/PLIST 29 May 2023 17:41:10 -0000 1.35
+++ pkg/PLIST 21 Feb 2026 04:36:24 -0000
@@ -64,18 +64,68 @@ share/doc/lighttpd/traffic-shaping.txt
share/doc/lighttpd/userdir.txt
share/doc/lighttpd/webdav.txt
share/examples/lighttpd/
+@sample ${SYSCONFDIR}/lighttpd/
share/examples/lighttpd/access.log
@owner _lighttpd
@group _lighttpd
@sample /var/www/logs/access.log
@owner
@group
+share/examples/lighttpd/conf.d/
+@sample ${SYSCONFDIR}/lighttpd/conf.d/
+share/examples/lighttpd/conf.d/access_log.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/access_log.conf
+share/examples/lighttpd/conf.d/auth.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/auth.conf
+share/examples/lighttpd/conf.d/cgi.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/cgi.conf
+share/examples/lighttpd/conf.d/debug.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/debug.conf
+share/examples/lighttpd/conf.d/deflate.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/deflate.conf
+share/examples/lighttpd/conf.d/dirlisting.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/dirlisting.conf
+share/examples/lighttpd/conf.d/evhost.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/evhost.conf
+share/examples/lighttpd/conf.d/expire.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/expire.conf
+share/examples/lighttpd/conf.d/fastcgi.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/fastcgi.conf
+share/examples/lighttpd/conf.d/magnet.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/magnet.conf
+share/examples/lighttpd/conf.d/mime.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/mime.conf
+share/examples/lighttpd/conf.d/proxy.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/proxy.conf
+share/examples/lighttpd/conf.d/rrdtool.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/rrdtool.conf
+share/examples/lighttpd/conf.d/scgi.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/scgi.conf
+share/examples/lighttpd/conf.d/simple_vhost.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/simple_vhost.conf
+share/examples/lighttpd/conf.d/ssi.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/ssl.conf
+share/examples/lighttpd/conf.d/status.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/status.conf
+share/examples/lighttpd/conf.d/tls.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/tls.conf
+share/examples/lighttpd/conf.d/userdir.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/userdir.conf
+share/examples/lighttpd/conf.d/webdav.conf
+@sample ${SYSCONFDIR}/lighttpd/conf.d/webdav.conf
share/examples/lighttpd/error.log
@owner _lighttpd
@group _lighttpd
@sample /var/www/logs/error.log
@owner
@group
+share/examples/lighttpd/lighttpd.annotated.conf
+@sample ${SYSCONFDIR}/lighttpd/lighttpd.annotated.conf
share/examples/lighttpd/lighttpd.conf
-@sample ${SYSCONFDIR}/lighttpd.conf
-share/examples/lighttpd/spawn-php.sh
+@sample ${SYSCONFDIR}/lighttpd/lighttpd.conf
+share/examples/lighttpd/modules.conf
+@sample ${SYSCONFDIR}/lighttpd/modules.conf
+share/examples/lighttpd/vhosts.d/
+@sample ${SYSCONFDIR}/lighttpd/vhosts.d/
+share/examples/lighttpd/vhosts.d/vhosts.template
+@sample ${SYSCONFDIR}/lighttpd/vhosts.d/vhosts.template
Index: pkg/lighttpd.rc
===================================================================
RCS file: /cvs/ports/www/lighttpd/pkg/lighttpd.rc,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 lighttpd.rc
--- pkg/lighttpd.rc 11 Mar 2022 20:10:04 -0000 1.7
+++ pkg/lighttpd.rc 21 Feb 2026 04:36:24 -0000
@@ -1,7 +1,7 @@
#!/bin/ksh
daemon="${TRUEPREFIX}/sbin/lighttpd"
-daemon_flags="-f ${SYSCONFDIR}/lighttpd.conf"
+daemon_flags="-f ${SYSCONFDIR}/lighttpd/lighttpd.conf"
. /etc/rc.d/rc.subr
UPDATE: lighttpd 1.4.82