Reverse Proxy Configuration (Caddy)
- Install
caddyusing the official documentation - Edit the Caddyfile
sudo nano /etc/caddy/Caddyfile - Add the following
# where example.com is your base domain # 127.0.0.1 is your host. It can be the IP of the docker container. cyberbro.example.com { reverse_proxy http://127.0.0.1:5000 header { Access-Control-Allow-Origin https://cyberbro.example.com # be very careful, you can put * at your own risk. } } -
Reload the configuration
orsudo systemctl reload caddysudo service caddy reload -
Access https://cyberbro.example.com (with an automatic Let's Encrypt certificate), that's great with
caddy