Certginx is a helper tool to generate certbot certificates. It is compatible with multiple domains and support multiple applications.
This project is neither affiliated with cerbot nor nginx.
Make sure your firewall allows the incoming 80 and 443 ports.
Open ports with iptables:
iptables -t filter -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 443 -j ACCEPT| ./nginx/conf.d/subdomain.domain.com.conf |
|---|
|
Replace all the occurrences of subdomain.domain.com with your domain name. Rename Rename |
Usage: ./certginx.sh <command> [options]
Commands:
add -d <domains> -e <email> Add domains with email (-e not required)
self-signed -d <name> Create self signed certificate
remove -d <domains> Remove domains
list List domains (not self signed)
update-tls Update TLS parameters
Update ./nginx/conf.d/<your-domain>.conf to suit your needs.
| ./nginx/conf.d/.conf |
|---|
|
Update localhost in |
I will use example-app as network, you may rename it.
| ./docker-compose.yml |
|---|
|
At the end of networks:
- example-appAt the end of the file, add: networks:
example-app:
external: trueExternal networks are not automatically created by docker-compose. To do so, just run the command below: |
You need to do the same thing in your docker-compose.yml app, but instead of nginx service, it will be your communicating service.
The best way to deploy your app with certginx is to create a user per application (eg. user certginx for certgins and user website for your website).
Use the latest ssl protocols.
| ./nginx/conf.d/00_tls-cipher.conf |
|---|
|
Catch bad sni (replace dummy-certificate with a dummy certificate).
| ./nginx/conf.d/01_catch-bad-sni.conf |
|---|
|
Catch bad vhost.
| ./nginx/conf.d/01_catch-bad-vhost.conf |
|---|
|
- nginx-certbot the base of the
add_domainscript.