Permalink
Browse files

nginx resolving at load time

  This commit experiments with:
  1) resolving the IP of LB/Frontend at nginx config load time
  2) Exploiting the fact that all names of a deployment *should* resolve
to IP addresses of frontends / routers
  3) making use of a blacklisted domain

  Assumption two is probably too much, as we might split domains in the
future?

Change-Id: Ib9a024c4eb69879dbc28f15f1d7f38fb7339596f
  • Loading branch information...
1 parent 185c7ca commit 40e5c8725774dd644bfc8446788d15eaf0291444 @d committed Oct 11, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 jobs/cloud_controller_ng/templates/nginx.conf.erb
@@ -125,5 +125,18 @@ http {
# Download the file and send it to client
proxy_pass $download_url;
}
+
+ location ~ ^/dea_next/http://([^/]+)/(.*){
+ # only allow internal redirects
+ internal;
+
+ set $dir_server_host $1;
+ set $download_path $2;
+ proxy_set_header Host $dir_server_host;
+ rewrite ^/dea_next/.* /$download_path break;
+
+ # Download the file and send it to client
+ proxy_pass http://jesse.<%= properties.domain %>;
+ }
}
}

0 comments on commit 40e5c87

Please sign in to comment.