/docker-nginx-redirect

Docker container for redirecting web-traffic based on nginx

Primary LanguageShell

docker-nginx-redirect

⚠️ Repository is under initial development

A very simple container to redirect HTTP traffic to another server, based on nginx

Resources

Configuration

Environment variables

  • SERVER_REDIRECT - server to redirect to, eg. www.example.com
  • SERVER_REDIRECT_PATH - optionally define path to redirect all requests eg. /landingpage if not set nginx var $request_uri is used

See also docker-compose.yml file.

Usage

With docker-compose

docker-compose up -d

With docker

docker run -e SERVER_REDIRECT=www.example.com -p 8888:80 schmunk42/nginx-redirect
docker run -e SERVER_REDIRECT=www.example.com -e SERVER_REDIRECT_PATH=/landingpage -p 8888:80 schmunk42/nginx-redirect

Built by dmstr