HTTP API to HTTPS APIHTTP API to HTTPS API
πŸŒ₯️

HTTP API to HTTPS API

Β 
  • Add A record
notion imagenotion image
  • NS server right is required
notion imagenotion image
  • Install auto-ssl image
    • Create Caddyfile
    • api.buhe.dev { reverse_proxy localhost:3040 }
    • Create other folder
    • . β”œβ”€β”€ Caddyfile β”œβ”€β”€ config └── data
    • Docker run
    • docker run --network host -d --cap-add=NET_ADMIN -p 80:80 -p 443:443 -p 443:443/udp \ -v /root/caddy/Caddyfile:/etc/caddy/Caddyfile \ -v /root/caddy/data:/data \ -v /root/caddy/config:/config \ caddy
    • --network host Image can access host network.
    • --cap-add=NET_ADMIN Image can access low number port.
Β 
Β 
PS:
Some utils.
caddy_container_id=$(docker ps | grep caddy | awk '{print $1;}') docker exec -w /etc/caddy $caddy_container_id caddy fmt --overwrite docker exec -w /etc/caddy $caddy_container_id caddy reload