My idea is put NGINX as proxy to redirect to Varnish (cache static content) and then proxy to apache with a lot of VirtualHost in different IPs. My problems is that I would know how can configure Varnish to send access to correct IP, I am going explain:
- Listen in: 10.10.10.10, 188.8.131.52 and 184.108.40.206 on ports: 80 and 443
- Proxy redirect to Varnish 10.10.10.10:8080, 220.127.116.11:8080 and 18.104.22.168:8080
- Port: 8080 - THIS IS THE PROBLEM
- Proxy content not static to Apache on port 8000 - THIS IS THE OTHER PROBLEM
- Listen in: 10.10.10.10:8000, 22.214.171.124:8000 and 126.96.36.199:8000
- Response correct VirtualHost
This is the idea. When I try with one IP only, all work correctly, because Varnish is only listen in one IP and port and send to backend in one IP and port too.
Could you help me to configure Varnish or there is a best way to configure similar scenario please?