Regex in proxy_pass

Hi

Hi

I’m trying to proxy requests
from http://example1.com/test/some/path
to http://test.example2.com/some/path

I’ve tried:
location ~ ^/(.*)/ {
proxy_pass http://$1.example2.com;
proxy_buffering off;
proxy_read_timeout 3600;
}

How can I do this?

Thanks

On Sun, Feb 07, 2010 at 11:14:06PM +0200, pablo platt wrote:

How can I do this?

It should work. Probably, you need to define
resolver 127.0.0.1;
and setup name server on localhost.


Igor S.
http://sysoev.ru/en/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs