Forum: NGINX regex in proxy_pass

Posted by pablo platt (Guest)
on 2010-02-07 22:14
(Received via mailing list)
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
Posted by Igor Sysoev (Guest)
on 2010-02-09 12:49
(Received via mailing list)
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 Sysoev
http://sysoev.ru/en/
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.