Sign inSign up

tacov/forwarder

By tacov

•Updated about 3 years ago

Slim nginx server redirecting all traffic to another domain, with HTTP 301 code.

Image
0

249

tacov/forwarder repository overview

Small Docker image purely for forwarding with 301 HTTP code. Useful for redirecting traffic from non-www to www version of a site, or vice versa.

See source at github: https://github.com/TacoV/forwarder⁠

Listens to port 80 and responds with a redirect to https://${REDIRECT_TO}, preserving the query.

⁠How to use

Run directly

docker run \
  -t my-forwarder \
  -e REDIRECT_TO=example.com \
  -p80:80 \
  tacov/forwarder

Run with Docker Compose

services:
  my-forwarder:
    image: tacov/forwarder
    ports:
      - 80:80
    environment:
      REDIRECT_TO: example.com

Tag summary

Content type

Image

Digest

sha256:69ed6b43c…

Size

5.1 MB

Last updated

about 3 years ago

docker pull tacov/forwarder