Sign inSign up

fclairamb/reverse-proxy

By fclairamb

Updated almost 8 years ago

Reverse proxy

Image
0

1.0K

fclairamb/reverse-proxy repository overview

docker-reverse-proxy

docker-reverse-proxy acts as a proxy container for your application. It is based on Apache and allows to restrict access with a CAS SSO, IP restrictions, and/or REMOTE_USER matching.

It runs fine on OpenShift and binds port 8080 per default.

Quick test

docker run -ti -p 9999:8080 -e PROXY_TARGET_URL='https://www.target.com/' fclairamb/docker-reverse-proxy
curl http://localhost:9999

Environment variabels

  • PROXY_TARGET_URL URL of the application to proxy to, must end with a trailing slash /. On OpenShift, this usually is something like http://service:port/
  • CAS_ENABLED enable CAS authentication (disabled by default)
  • IPS_ACCESS_WHITELIST optional comma separated list of IPs/subnets that are allowed to access the proxy
  • REMOTE_USER_REGEX optional regex the REMOTE_USER must match against (e.g. [email protected]$)
  • LOG_LEVEL optional log level for Apache (default is info)
  • HEALTHCHECK_ENABLED when enabled, this will proxy /health (no authentication needed) to the given target path (see below) of the target URL (disabled by default)
    • HEALTHCHECK_TARGET_PATH target path for the health check on the target url (PROXY_TARGET_URL)
    • HEALTHCHECK_IPS optional comma separated list of IPs/subnets that are allowed to access the /health endpoint

Testing it locally

To run it locally, you can use the following commands:

docker build -t docker-reverse-proxy:latest .
docker run -ti -p 9999:8080 -e PROXY_TARGET_URL='http://example.net/' docker-reverse-proxy

Tag summary

Content type

Image

Digest

Size

85.8 MB

Last updated

almost 8 years ago

docker pull fclairamb/reverse-proxy