This Docker container listens on port 80 and redirects all web traffic to the given target domain/URL.
The target domain/URL is set by the REDIRECT_TARGET environment variable.
Redirect type is 302 (temporary redirect). If environment variable REDIRECT_PERMANENT is set to true then redirect is 301 (permanent).
Possible redirect targets include domains (mydomain.net), paths (mydomain.net/my_page) or specific protocols (https://mydomain.net/my_page).
Example: $ docker run --rm -d -e REDIRECT_TARGET=mydomain.net -p 80:80 neatous/nginx-redirect
Example: $ docker run --rm -d -e REDIRECT_TARGET=mydomain.net -e REDIRECT_PERMANENT=true -p 80:80 neatous/nginx-redirect
The URL path and GET parameters are retained. That means that a request to http://myolddomain.net/index.php?page=2 will be redirected to http://mydomain.net/index.php?page=2 when REDIRECT_TARGET=mydomain.net is set.
Content type
Image
Digest
sha256:866856c65…
Size
25.4 MB
Last updated
3 months ago
docker pull neatous/nginx-redirect