You must setup Podman first.
Steps
- create lighttpd directory in $HOME/podman
mkdir -p ~/podman/lighttpd && cd ~/podman/lighttpd - copy from compose.yml
nano compose.yml - create www and conf.d directory
mkdir -p www/conf.d - copy from lighttpd.conf
nano www/lighttpd.conf - copy from mimetype.conf
nano www/conf.d/mimetype.conf - copy from kms.conf
nano www/conf.d/kms.conf - copy from portfolio.conf
nano www/conf.d/portfolio.conf - extract files to www/kms and www/portfolio
- start lighttpd
podman-compose -f ~/podman/lighttpd/compose.yml systemd -a register systemctl --user enable --now podman-compose@lighttpd
compose.yml
version: "3"
services:
lighttpd:
image: docker.io/heinokesoe/lighttpd:latest
container_name: lighttpd
networks:
- traefik
volumes:
- ./www:/var/www
command: -D -f /var/www/lighttpd.conf
restart: unless-stopped
labels:
- "io.containers.autoupdate=registry"
networks:
traefik:
external: true
lighttpd.conf
server.document-root = "/var/www/html"
server.username = "nobody"
server.groupname = "nogroup"
server.error-handler-404 = "/404.html"
include "/var/www/conf.d/*.conf"
mimetype.conf
mimetype.use-xattr = "disable"
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".torrent" => "application/x-bittorrent",
".gz" => "application/x-gzip",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".css" => "text/css; charset=utf-8",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain; charset=utf-8",
".c" => "text/plain; charset=utf-8",
".cpp" => "text/plain; charset=utf-8",
".log" => "text/plain; charset=utf-8",
".conf" => "text/plain; charset=utf-8",
".text" => "text/plain; charset=utf-8",
".txt" => "text/plain; charset=utf-8",
".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",
"" => "application/octet-stream",
)
kms.conf
$HTTP["host"] == "kms.example.com" {
server.document-root = "/var/www/kms"
index-file.names = ( "index.html" )
}
portfolio.conf
$HTTP["host"] == "example.com" {
server.document-root = "/var/www/portfolio"
index-file.names = ( "index.html" )
}