Created
May 25, 2018 12:56
-
-
Save q7r/1313f908c88720a1b3f72cb24fae0a25 to your computer and use it in GitHub Desktop.
caddy installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /usr/local/bin | |
wget https://www.dropbox.com/s/lnk9mriccwydhow/caddy | |
chown root:root /usr/local/bin/caddy | |
chmod 755 /usr/local/bin/caddy | |
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy | |
groupadd -g 33 www-data | |
useradd -g www-data --no-user-group --home-dir /var/www --no-create-home --shell /usr/sbin/nologin --system --uid 33 www-data | |
mkdir /etc/caddy | |
chown -R root:www-data /etc/caddy | |
mkdir /etc/ssl/caddy | |
chown -R root:www-data /etc/ssl/caddy | |
chmod 0770 /etc/ssl/caddy | |
wget https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-systemd/caddy.service | |
cp caddy.service /etc/systemd/system/ | |
chown root:root /etc/systemd/system/caddy.service | |
chmod 644 /etc/systemd/system/caddy.service | |
systemctl daemon-reload | |
systemctl start caddy.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment