<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Hi,</span></div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><br></span></div><div apple-content-edited="true">I need to alias a subdomain to contents of an url, e.g. I need <a href="http://abcd.domain.com/">http://abcd.domain.com/</a> to proxy contents of <a href="http://www.domain.com/path1/path2/xyz">http://www.domain.com/path1/path2/xyz</a></div>
<br><div>All my attempts with proxy_pass resulted in 301 to <a href="http://abcd.domain.com/path1/path2/xyz">http://abcd.domain.com/path1/path2/xyz</a> and a 404 with strange duplicate uri /path1/path2/xyzpath1/path2/xyz</div><div><br></div><div><div> server {</div><div> listen 11.22.33.44:80;</div><div> server_name <a href="http://abcd.domain.com">abcd.domain.com</a>;</div><div><br></div><div> location / {</div><div> proxy_pass <a href="http://www.domain.com/path1/path2/xyz">http://www.domain.com/path1/path2/xyz</a>;</div><div> }</div></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div><div><br></div><div>I'm clearly missing something, please help!</div></body></html>