joshuamarquez / docker-https-redirect

NGINX docker image to redirect request from HTTP to HTTPS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/

About

NGINX docker image to redirect request from HTTP to HTTPS.

License:MIT License


Languages

Language:Nginx 100.0%