Skip to content

Just a simple nginx https proxy using certbot (Let’s Encrypt / Certbot)

Notifications You must be signed in to change notification settings

tcmug/nginxhttpsproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginxhttpsproxy

What is it?

This is a Docker image based on the official nginx image. This image is automated to fetch a free SSL certificate (Let's Encrypt / Certbot) for the given domain(s) and to work as a proxy for the given urls.

Usage

Single domain

docker run -p 443:443 -p 80:80 --env DOMAIN=example.com --env PROXY=https://www.google.com --env [email protected] tcmug/nginxhttpsproxy

Multiple domains

docker run -p 443:443 -p 80:80 --env DOMAIN="example.com inbox.example.com" --env PROXY="https://www.google.com https://inbox.google.com" --env [email protected] tcmug/nginxhttpsproxy

Self signed certificate for testing

docker run -p 443:443 -p 80:80 --env DOMAIN="example.com inbox.example.com" --env PROXY="https://www.google.com https://inbox.google.com" --env MODE=test --env [email protected] tcmug/nginxhttpsproxy

Storing certificates to the host machine

docker run -p 443:443 -p 80:80 --env DOMAIN="example.com inbox.example.com" --env PROXY="https://www.google.com https://inbox.google.com" -v /home/username/certs:/etc/letsencrypt --env [email protected] tcmug/nginxhttpsproxy

Environment variables

CERTBOT_EMAIL

Certbot email address for important account notifications.

Example

ENV [email protected]

MODE

Set to test for testing. This makes certbot issue a self signed certificate.

Example

ENV MODE=test

DOMAIN

The domain or domains you own and which is configured to the IP of the machine you're running docker on.

Example

ENV DOMAIN=example.com google.example.com

PROXY

The host or hosts you wish to proxy, URL. Define one for each DOMAIN (1:1).

Example

ENV PROXY=http://11.22.33.44 https://www.google.com

Releases

No releases published

Packages

No packages published

Languages