Welcome! Log In Create A New Profile

Advanced

Re: Use rewrite /blog to transparently proxy to another app

August 02, 2010 04:14PM
On Mon, Aug 02, 2010 at 10:01:26PM +0200, Fernando Perez wrote:

> Sorry for the typos, trialing should read trailing.
>
> Here is the complete thing for those interested, your mileage may vary
> depending how you want the backend app to handle /blog/uri or just /uri
>
> location ^~ /blog/ {
> rewrite /blog/(.+) $1 break;
> proxy_set_header Host $http_host;
> root /optional/root;
> proxy_pass http://127.0.0.1:3000/$1;
> }

location ^~ /blog/ {
proxy_pass http://127.0.0.1:3000/;
proxy_set_header Host $http_host;
}


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Use rewrite /blog to transparently proxy to another app

Fernando Perez August 02, 2010 12:20PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 02, 2010 03:22PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 02, 2010 04:06PM

Re: Use rewrite /blog to transparently proxy to another app

Igor Sysoev August 02, 2010 04:14PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 03, 2010 02:38PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 03, 2010 02:52PM

Re: Use rewrite /blog to transparently proxy to another app

Igor Sysoev August 03, 2010 02:52PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 03, 2010 03:22PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 05:10AM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 05:40AM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 05:46AM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 07:52AM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 07:56AM

Re: Use rewrite /blog to transparently proxy to another app

Igor Sysoev August 05, 2010 08:08AM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 05, 2010 12:40PM

Re: Use rewrite /blog to transparently proxy to another app

Igor Sysoev August 05, 2010 12:42PM

Re: Use rewrite /blog to transparently proxy to another app

Fernando Perez August 02, 2010 03:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 309
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready