File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
3+ curl -1sLf ' https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
4+ curl -1sLf ' https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
5+ sudo apt update
6+ sudo apt install caddy
7+
8+ systemctl enable caddy --now
9+ ufw allow 80 443
10+
11+ # Ask user to input domain name
12+ echo " Enter your domain name (e.g. example.com):"
13+ read DOMAIN_NAME
14+
15+ # Create Caddyfile
16+ echo " Creating Caddyfile..."
17+ cat << EOF > /etc/caddy/Caddyfile
18+ ${DOMAIN_NAME} {
19+ reverse_proxy localhost:20100
20+ }
21+ EOF
You can’t perform that action at this time.
0 commit comments