so the next step that also very interesting is on how to setup your running server and also have https already.
For now its been running in codify.my.id
and I am using elastic IP from AWS
ok but how step by step
Caddy
Step 1: Install Caddy
https://caddyserver.com/docs/install
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
sudo vim /etc/caddy/Caddyfile
:80 {
reverse_proxy localhost:3000
}
sudo systemctl restart caddy
Step 2: Configure Caddy to Use HTTPS
Update the Caddyfile to use your domain name and enable HTTPS.
sudo vim /etc/caddy/Caddyfile
mydomain.com {
reverse_proxy localhost:3000
}
:80 {
reverse_proxy localhost:3000
}
sudo systemctl restart caddy
0 Comments