Git Product home page Git Product logo

docker-lets-encrypt-proxy's Introduction

docker-lets-encrypt-proxy

Nginx Reverse Proxy automatically managing Let's Encrypt certificates

Environment variables:

  • ORIGIN_HOST main server hostname or ip address
  • ORIGIN_PORT main server port (optional, defaults to 80)
  • DOMAINS regular expression of valid domains

Volumes:

  • /cache mount a rw volume to cache SSL private keys and web content
docker run -t -p 80:80 -p 443:443 -v $(pwd)/cache:/cache:rw -e ORIGIN_HOST=172.217.18.206 -e DOMAINS=test front

Caching

By default, succesfull GET responses are cached for one day. Error responses (not 200, 301 or 302) are cached for five seconds. Methods other than GET or HEAD are not cached at all. Specifically POST requests are not cached.

The X-Accel-Expires header can be used to change the default cache time. The value 0 disables caching of the result. Other numbers set the cache validity in seconds. The normal cache affecting headers Expires, Cache-Control, Set-Cookie, Vary are ignored, but they are passed to the

The cache can be explicitely invalidated by the ORIGIN_HOST. To do this, the origin sends the request to be invalidated with an additional header X-Accel-Purge: purge. The ORIGIN_HOST will imediately be requested for the updated content.

Cache entries can get aribitrarily removed, but this should not happen often.

Rate limiting

The rate limiter is based on remote ip address. After an initial burst of ten requests, the request rate is limited to one request per second. There is also a hard limit of 100 open connections per ip address.

Connections are also required to send the headers and body within 5 seconds. This prevents a class of attacks (‘slowloris’) where the attacker tries to keep many connections open.

docker-lets-encrypt-proxy's People

Contributors

recmo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.