Generic redirect handler
Pull latest docker image
docker pull bowtie/nginx-redirects
Build it yourself (from this repo)
docker build -t bowtie/nginx-redirects .
All incoming servernames redirected to a single destination
docker run -it -p 8080:80 -e SERVER_REDIRECTS=https://google.com bowtie/nginx-redirects
Different destination based on incoming servername
docker run -it -p 8080:80 -e SERVER_REDIRECTS=https://google.com%localhost,https://github.com%127.0.0.1 bowtie/nginx-redirects
Specify redirect code (defaults to 302, temporary)
docker run -it -p 8080:80 -e SERVER_REDIRECTS=https://google.com%localhost%301,https://github.com%127.0.0.1%302 bowtie/nginx-redirects
Single ENV var expected: SERVER_REDIRECTS
A single redirect configuration group looks like
DESTINATION%SOURCE%CODE
%DESTINATION required
SOURCE optional
DESTINATION_ (all incoming server names)server_name regex patternsCODE optional
301 or 302)302 (temporary redirect)You can specify more than 1 configuration group as comma separated list
SERVER_REDIRECTS=D1%S1,D2%S2,D3%S3,...
Content type
Image
Digest
Size
42.6 MB
Last updated
about 8 years ago
docker pull bowtie/nginx-redirects