https://github.com/chimeracoder/nginx-ssl-docker
A simple Docker image for running nginx with SSL
https://github.com/chimeracoder/nginx-ssl-docker
Last synced: 11 months ago
JSON representation
A simple Docker image for running nginx with SSL
- Host: GitHub
- URL: https://github.com/chimeracoder/nginx-ssl-docker
- Owner: ChimeraCoder
- Created: 2015-04-11T23:36:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-13T19:48:40.000Z (almost 11 years ago)
- Last Synced: 2025-01-28T13:52:08.865Z (about 1 year ago)
- Language: Nginx
- Size: 121 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
nginx-ssl
===========
A simple Docker image for running nginx with SSL. Intended to be used in conjunction with other applications and/or services.
This repository demonstrates the process of using a Dockerfile to create a Docker container that is then run on a machine without Docker (using systemd-nspawn).
1. Create SSL certificate:
````sh
$ openssl req -new -newkey rsa:2048 -nodes -keyout nginx.key -out nginx.csr
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout nginx.key -out nginx.crt
$ openssl dhparam -out dhparam.pem 2048
````
Use your domain/subdomain as the "Common name" (FQDN). Do not use a challenge password. All other fields are optional.
2. Update the `server_name` field in `nginx.conf` to use your domain/subdomain.
3. Update the `proxy_pass` field to point to the application you wish to serve.