deb/lighttpd-register-test.bash
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 07 May 2023 12:48:30 +0300
changeset 20 f1b38aa4fa52
parent 7 1a62f2b0517c
permissions -rw-r--r--
Removed tab.

#!/bin/bash

apt install rsync

d=test
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