Welcome! Log In Create A New Profile

Advanced

Re: Proxy subdomain root to a different server url

May 12, 2012 08:26AM
On Sat, May 12, 2012 at 04:03:57PM +0400, Vahan Yerkanian wrote:
> Hi Chris,
>
> I was missing $1 in the end of the uri so the rewrite works.
> Without it, it was being silently ignored and was creating a redirect loop.
>
> For the mailing list archival purposes, here is what I ended up with:
>
> server {
> listen 11.22.33.44:80;
> server_name abcd.domain.com;
>
> location / {
> rewrite ^(.*)$ /path1/path2/filename$1 break;
> proxy_pass http://www.domain.com;
> }
> server_tokens off;
> }

This works without rewrites:

location / {
proxy_pass http://www.domain.com/path1/path2/filename/;
}


--
Igor Sysoev

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

Proxy subdomain root to a different server url

Vahan Yerkanian May 12, 2012 06:38AM

Re: Proxy subdomain root to a different server url

hexa May 12, 2012 06:44AM

Re: Proxy subdomain root to a different server url

Vahan Yerkanian May 12, 2012 08:06AM

Re: Proxy subdomain root to a different server url

Igor Sysoev May 12, 2012 08:26AM

Re: Proxy subdomain root to a different server url

xore May 12, 2012 10:19AM

Re: Proxy subdomain root to a different server url

Vahan Yerkanian May 12, 2012 10:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready