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:
https://example.com
as your redirect URL.www.example.com
to this app.www2.example.com
and etc.https://example.com
example.com
to your actual app.