Public | Automated Build

Last pushed: 3 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.


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  ...
$ docker run -e  ...

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

$ docker run -d -e, alexeym/301-to-www
Docker Pull Command
Source Repository