Skip to content

Instantly share code, notes, and snippets.

@HairAndBeardGuy
Created July 15, 2017 13:34
Show Gist options
  • Save HairAndBeardGuy/7e2b87efda743f43b22a2c44c4fdd9b9 to your computer and use it in GitHub Desktop.
Save HairAndBeardGuy/7e2b87efda743f43b22a2c44c4fdd9b9 to your computer and use it in GitHub Desktop.
Install Caddy Server on Ubuntu 14.04 with Upstart
apt install curl
curl https://getcaddy.com | bash -s cors,expires,filemanager,git,hugo,ipfilter,jsonp,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir /etc/caddy
chown -R root:www-data /etc/caddy
mkdir /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy
chmod 0770 /etc/ssl/caddy
touch /etc/caddy/Caddyfile
mkdir /var/www
chown www-data:www-data /var/www
chmod 555 /var/www
curl -L https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-upstart/caddy.conf -o /etc/init/caddy.conf
chown root:root /etc/init/caddy.conf
chmod 744 /etc/init/caddy.conf
sudo service caddy start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment