Skip to content
This repository has been archived by the owner on Apr 20, 2022. It is now read-only.

Simple nginx docker container which redirects all http traffic to https

License

Notifications You must be signed in to change notification settings

jfharden/nginx-https-redirector

Repository files navigation

ARCHIVED

AWS added redirect ability to ALBs a long while ago and I haven't needed to use this in a few years now.

nginx-https-redirector

Provides a docker container running nginx which receives connections on port 80 and redirects them to an https version of the same URL.

The purpose of this is to run behind an ALB (which hosts multiple other websites all served over https with their own certificates) and receive connections for any domain on port 80 and redirect to the https version of the site.

The repository includes some limited testing using both inspec and rspec, but all of this is excluded from the container by the .dockerignore.

To run the tests you first need to build the container and name it nginx-https-redirector:tests

docker build -t nginx-https-redirector:tests .

Then you can run the tests with rake

bundle install
bin/rake

About

Simple nginx docker container which redirects all http traffic to https

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published