nginx-0.7.4

Ed W lists at wildgooses.com
Mon Jun 30 21:51:30 MSD 2008


Igor Sysoev wrote:
> Changes with nginx 0.7.4                                         30 Jun 2008
>
>     *) Feature: variables support in the "access_log" directive.
>   

This is excellent!

However, I have quite a few rails sites and I would like to use a 
variable in the proxy_pass definition also..

I would like to use $site to simplify this as follows (so that I can 
chuck the whole lot in the include section):


        upstream mongrel_cluster_production.admin.mysite.com {
            server 127.0.0.1:8031;
            server 127.0.0.1:8032;
        }

        server {
                listen          1.2.3.4;
                server_name     admin.mysite.com *.admin.mysite.com ;
                set             $site  "admin.mysite.com";
...
                location / {
                        include /etc/nginx/std_rails_root.conf;
                        if (!-f $request_filename) {
                                proxy_pass 
http://mongrel_cluster_production.$site;
                                break;
                        }
                }
        }


Would you please consider extending this feature to the proxy_pass 
definition also (static variables set at the server level are plenty for 
my requirements)

Thanks for listening...

Ed W





More information about the nginx mailing list