Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tochk/nginx-ssl-confgen
Simple nginx config generator with let's encrypt support
https://github.com/tochk/nginx-ssl-confgen
https letsencrypt nginx ssl
Last synced: 2 months ago
JSON representation
Simple nginx config generator with let's encrypt support
- Host: GitHub
- URL: https://github.com/tochk/nginx-ssl-confgen
- Owner: tochk
- License: apache-2.0
- Created: 2021-09-19T08:59:55.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T14:11:06.000Z (over 1 year ago)
- Last Synced: 2024-10-15T19:41:22.687Z (3 months ago)
- Topics: https, letsencrypt, nginx, ssl
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nginx config generator (nginx-ssl-confgen)
Simple nginx config generator with let's encrypt support
## Prerequisites
- 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)### Ubuntu server installation
```shell
apt-get update
apt-get install nginx certbot python3-certbot-nginx
```## Installation
Go to releases page and download `deb` package.
## Usage
```
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):
```shell
nginx-ssl-confgen -servers=example.com -proxy-pass=http://localhost:8080 -generate-ssl [email protected] -agree-tos
```### Crontab setup (for certbot renewal)
If your certbot package does not have `certbot.timer`, add the following line to the crontab for automatic certificate renewal:
```cronexp
0 6 * * * certbot renew
```## Building
### Prerequisites
- go 1.20
### Building binary
```shell
make build-amd64 # amd64 binary
```
OR
```shell
make build-arm64 # arm64 binary
```### Building deb package
```shell
make build-deb-amd64 # amd64 deb package
```
OR
```shell
make build-deb-arm64 # arm64 deb package
```# TODO
- [ ] Tests
- [ ] Linters
- [ ] RPM builds