caprover / nginx-redirect

A very simple redirector using nginx and Docker
11 stars 4 forks source link

nginx-redirect

A very simple redirector using nginx and Docker

docker run -p 1234:80 --env RETURN_LOCATION='return 301 https://caprover.com$request_uri;' caprover/nginx-redirect

Open http://localhost:1234 in your browser.

This is available as a CapRover one click app. It's useful when you want to create domain aliases. For example you want all traffic from http(s)://www.example.com to be redirected to https://example.com. In this case: