Sign inSign up

joshuamarquez/https-redirect

By joshuamarquez

•Updated over 9 years ago

NGINX docker image to redirect request from HTTP to HTTPS.

Image
0

2.3K

joshuamarquez/https-redirect repository overview

⁠docker-https-redirect

NGINX docker image to redirect request from HTTP to HTTPS.

⁠Install

$ docker pull joshuamarquez/https-redirect

⁠Test

To test it actually works first run https-redirect instance.

$ docker run --name nginx_redirect -d https-redirect

Then using appropriate/curl make a request.

$ docker run --network container:nginx_redirect appropriate/curl -Is $(docker ps -aqf "name=nginx_redirect")

It should respond with something like:

HTTP/1.1 301 Moved Permanently
Server: nginx/1.11.13
Date: Wed, 17 May 2017 00:35:51 GMT
Content-Type: text/html
Content-Length: 186
Connection: keep-alive
Location: https://7f708982c19d/

Tag summary

Content type

Image

Digest

Size

6.4 MB

Last updated

over 9 years ago

docker pull joshuamarquez/https-redirect