deb/lighttpd-register-2048.bash
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 02 May 2024 15:55:17 +0300
changeset 37 f2b49f2d087b
parent 7 1a62f2b0517c
permissions -rw-r--r--
Origin of Apache LEtsEncrypt config.

#!/bin/bash

apt install rsync

d=2048
mkdir -p /srv/www/$d
chown user:user /srv/www/$d

cat <<EOF >/etc/lighttpd/conf-available/92-$d.conf
\$HTTP["host"] == "$d.defun.work" {
  server.document-root = "/srv/www/$d"
}
EOF

lighttpd-enable-mod $d
service lighttpd restart