author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Sun, 07 May 2023 12:48:30 +0300 | |
changeset 20 | f1b38aa4fa52 |
parent 9 | 096e320e01b0 |
permissions | -rw-r--r-- |
9 | 1 |
#!/bin/bash |
2 |
||
3 |
apt install rsync |
|
4 |
||
5 |
d=stat |
|
6 |
mkdir -p /srv/www/$d |
|
7 |
chown user:user /srv/www/$d |
|
8 |
||
9 |
cat <<EOF >/etc/lighttpd/conf-available/92-$d.conf |
|
10 |
\$HTTP["host"] == "$d.defun.work" { |
|
11 |
server.document-root = "/srv/www/$d" |
|
12 |
} |
|
13 |
EOF |
|
14 |
||
15 |
lighttpd-enable-mod $d |
|
16 |
service lighttpd restart |