Last active
June 4, 2024 19:29
-
-
Save alexleekt/51aeefa859751e0d012a6772b6f0eed4 to your computer and use it in GitHub Desktop.
caddyserver
This file contains 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
# https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-ubuntu-16-04 | |
curl -s https://getcaddy.com | bash -s personal dns,net,http.cors,http.filter,http.filemanager,http.forwardproxy,http.git,http.jwt,http.login,http.minify,http.nobots,http.upload | |
sudo mkdir /etc/caddy | |
sudo chown -R root:www-data /etc/caddy | |
sudo touch /etc/caddy/Caddyfile | |
sudo mkdir /etc/ssl/caddy | |
sudo chown -R www-data:root /etc/ssl/caddy | |
sudo chmod 0770 /etc/ssl/caddy | |
sudo mkdir /var/www | |
sudo chown www-data:www-data /var/www | |
echo '<h1>Hello World!</h1>' | sudo tee /var/www/index.html | |
sudo ufw allow http | |
sudo ufw allow https | |
sudo curl -s https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-systemd/caddy.service -o /etc/systemd/system/caddy.service | |
sudo systemctl daemon-reload | |
sudo systemctl enable caddy.service | |
sudo systemctl status caddy.service | |
sudo systemctl start caddy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment