Currently, I have nginx > 25 x nginx + fcgi
The main nginx, does the load balancing and each virtualhost listens to a different ip (different products).
some of the ips receive different hostnames, and they get rewritten back to the backend servers like:
GET /path HTTP/1.1
We're currently replacing the main proxy with haproxy (better load balancing algorithms) but I can't figure out how to append the original host. (I can't find any documentation on variables like nginx's $host).
I can rewrite the url like:
reqirep ^Host: Host:\ app1
but "app1" still requires the original hostname to do business logic.
I thought about running each app on a different port but the problem is that I want nginx's
httpchk to work for all the backend servers, and doing one
backend per app means 10 apps x 10 checks = 10 checks per second to each backend (unless the log data lied).
Anyone have an Idea?