Simple nginx config generator with let's encrypt support
- nginx
- certbot (if you want to use let's encrypt certificate generation)
- python3-certbot-nginx (if you want to use let's encrypt certificate generation)
apt-get update
apt-get install nginx certbot python3-certbot-nginx
Go to releases page and download deb
package.
Usage of nginx-ssl-confgen:
-agree-tos
let's encrypt terms of service agreement
-email string
email for letsencrypt
-generate-ssl
generate letsencrypt certificate
-local-dir string
http files directory
-nginx-conf-dir string
nginx sites available directory (default "/etc/nginx/sites-available/")
-nginx-conf-dir-enabled string
nginx sites enabled directory (default "/etc/nginx/sites-enabled/")
-proxy-pass string
proxy pass server
-servers string
comma-separeted domains list
-ssl-full-chain string
ssl full chain path
-ssl-private-key string
ssl private key path
Example (with let's encrypt certificate and proxy pass):
nginx-ssl-confgen -servers=example.com -proxy-pass=http://localhost:8080 -generate-ssl -email=me@example.com -agree-tos
If your certbot package does not have certbot.timer
, add the following line to the crontab for automatic certificate renewal:
0 6 * * * certbot renew
- go 1.20
make build-amd64 # amd64 binary
OR
make build-arm64 # arm64 binary
make build-deb-amd64 # amd64 deb package
OR
make build-deb-arm64 # arm64 deb package
- Tests
- Linters
- RPM builds