Automatic creation of HTTPS subdomain reverse proxy using nginx
and certbot
.
- A Debian-based system as the script uses
apt
. - The subdomain's A/AAAA DNS record must be configured to be pointing to this machine.
- The machine must be able to receive the HTTP inbound message for certbot verification.
./create-proxy.sh {subdomain} {service-uri}
For example, let say you want to create a reverse proxy of a local service localhost:8080
to app1.example.com
:
./create-proxy.sh app1.example.com localhost:8080
The script was written in inspiration from this Gist written by gmolveau.