Welcome! Log In Create A New Profile

Advanced

Proxy subdomain root to a different server url

Vahan Yerkanian
May 12, 2012 06:38AM
Hi,

I need to alias a subdomain to contents of an url, e.g. I need http://abcd.domain.com/ to proxy contents of http://www.domain.com/path1/path2/xyz

All my attempts with proxy_pass resulted in 301 to http://abcd.domain.com/path1/path2/xyz and a 404 with strange duplicate uri /path1/path2/xyzpath1/path2/xyz

server {
listen 11.22.33.44:80;
server_name abcd.domain.com;

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

I'm clearly missing something, please help!_______________________________________________
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: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready