4 messages in ru.sysoev.nginxRe: Variables and proxy_pass
FromSent OnAttachments
Jonathan DanceSep 27, 2006 12:48 pm 
Cliff WellsSep 29, 2006 6:02 pm 
Igor SysoevOct 2, 2006 6:08 am 
Igor SysoevOct 2, 2006 6:24 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Variables and proxy_passActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Oct 2, 2006 6:24:10 am
List:ru.sysoev.nginx

On Fri, 29 Sep 2006, Cliff Wells wrote:

On Wed, 2006-09-27 at 15:48 -0400, Jonathan Dance wrote:

There's been at least one other inquiry about using variables in proxy directives on the IRC channel:

how can I obtain a proxy pass rule like the following:

proxy_pass http://localhost:7777/vhost/http/$host/;

unfortunately $host is not substituted do I need to use rewrite rules

first?

I think this is a reasonable request... would it be difficult to implement?

I will add the variables support in the proxy_pass directive.

As to location / { proxy_pass http://localhost:7777/vhost/http/$host/; }

the following workaround can be used:

location / { rewrite ^(.*)$ /vhost/http/$host/$1 break; proxy_pass http://localhost:7777; }