Now I have this setup
Port 80 redirects to port 443 with nginx, then it use varnish as upstream, now when it comes back, I need to setup some variables in nginx, fx
My domains are with subdomains such as en.mydomain.com, de.mydomain.com
server {
server_name 127.0.0.1;
listen 8080;
$VAR = en;
}
server {
server_name 127.0.0.1;
listen 8080;
$VAR = de;
}
How do I figure out which domain was used to get to this - I think I need to have multiple ports and then varnish should redirect to each backend depending on the domain, how do I set varnish to return to a backend depending on the domain?