proxy_set_header inheritance not working?

Ed W lists at
Fri Apr 11 19:17:02 MSD 2008


> 2. Expanding this at configuration stage may be a good idea, but this 
> isn't really a problem since with small number of vhosts you may 
> easily configure this by hand, and with huge number of vhosts you 
> probaly anyway generate configs.

Yes, expanding at configuration time is what I had in mind, not runtime! 

Scripting vhost generation is not always that easy.  Also for "medium" 
number of vhosts it's a pain.  eg I have quite a few vhosts for 
different applications, but each application needs largely a different 
overall config, but a similar core config and so I really just want to 
"include std_vhost.conf" at the top and get all the standard stuff like 
gzip config, log location, etc.  Because each app is usually different I 
don't try to template the deployment because that just increases my 
deployment complexity (one template per vhost - it saves no time)

If expanding at config time were possible it would be very useful... (I 
use this a lot in my old apache config)

I also sent a related question yesterday about using config time 
variables for the proxy pass:

For my rails app I reverse proxy to mongrel and this works ok:

     if (!-f $request_filename) {
       proxy_pass http://mongrel_cluster;

But this does not:

   set $cluster  "mongrel_cluster"
     if (!-f $request_filename) {
       proxy_pass http://$cluster;

The problem seems to be that the later changes the headers in some way 
that mongrel chokes on (see my previous email for the error from mongrel)

This would really reduce my config complexity to be able to template 
this up...

Thanks for listening..

Ed W

More information about the nginx mailing list