0

How can I put a docker between the web requests and my web server (in order to analyse and block requests)? I found morbz/docker-web-redirect docker, but it seems that it is not enough for this task.

Iman
  • 473
  • 1
  • 4
  • 20
  • What have you already tried? Why would Docker necessarily be involved? – David Maze Dec 05 '18 at 21:01
  • @DavidMaze because by using docker, the setup process would be easier for my customers (instead of installing a Linux daemon to block requests) – Iman Dec 06 '18 at 17:13

1 Answers1

2

I'd recommend using nginx as reverse proxy, or better haproxy:

https://hub.docker.com/_/haproxy/

You have to configure haproxy container to listen to port 80 on the host, then direct traffic to your proxied web server.

Haproxy ACLS might be of your interest: How to route traffic (reverse Proxy) with HAProxy based on request body

Robert
  • 33,429
  • 8
  • 90
  • 94
  • Thank you for your answer, can I block requests on a docker? (block them in order to protect the web server outside of the docker) – Iman Dec 06 '18 at 17:15
  • Yes you can. That's one of the usual tasks of a reverse proxy. It just depends on what's the criteria for blocking. – Robert Dec 06 '18 at 21:57
  • Thank you very much – Iman Dec 07 '18 at 17:49