Public | Automated Build

Last pushed: 2 years ago
Short Description
provides 301 to www.* redirects when used with Nginx reverse proxy container
Full Description

#301 to www
This Docker image is meant to work in combination with Jason Wilder's nginx-proxy Docker container to help setting up 301 redirects from your non-www to www-based domain URLs.

This is generally done to normalize URLs for the SEO purposes.

##Usage

Run nginx-proxy

$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy

Then start proxied containers with VIRTUAL_HOST environment variable having www-based URL

$ docker run -e VIRTUAL_HOST=www.example.org  ...
...
$ docker run -e VIRTUAL_HOST=www.acme.com  ...

Run 301-to-www container specifying non-www-based host names that requre a 301 redirect

$ docker run -d -e VIRTUAL_HOST=example.org,acme.com alexeym/301-to-www
Docker Pull Command
Owner
alexeym
Source Repository

Comments (0)