atom feed50 messages in ru.sysoev.nginxRe: How to redirect back to domain na...
FromSent OnAttachments
Aleksandar LazicApr 20, 2008 2:34 pm 
Bedros HanounikApr 20, 2008 3:21 pm 
Manlio PerilloApr 20, 2008 3:26 pm 
Cliff WellsApr 20, 2008 3:34 pm 
Cliff WellsApr 20, 2008 3:38 pm 
Aleksandar LazicApr 21, 2008 12:46 am 
Aleksandar LazicApr 21, 2008 12:50 am 
Aleksandar LazicApr 21, 2008 1:27 am 
Aleksandar LazicApr 21, 2008 1:29 am 
Kiril AngovApr 21, 2008 7:47 pm 
Kiril AngovApr 21, 2008 7:48 pm 
Kiril AngovApr 21, 2008 7:57 pm 
Igor SysoevApr 21, 2008 11:13 pm 
Marcin KasperskiApr 22, 2008 1:18 am 
Manlio PerilloApr 22, 2008 3:23 am 
Igor SysoevApr 22, 2008 3:38 am 
Manlio PerilloApr 22, 2008 3:54 am 
Manlio PerilloApr 22, 2008 4:07 am 
Igor SysoevApr 22, 2008 4:18 am 
Marcin KasperskiApr 22, 2008 5:05 am 
Manlio PerilloApr 22, 2008 6:18 am 
Manlio PerilloApr 22, 2008 6:50 am 
Igor SysoevApr 22, 2008 7:10 am 
Manlio PerilloApr 22, 2008 7:30 am 
Kiril AngovApr 22, 2008 7:42 am 
Cliff WellsApr 22, 2008 12:24 pm 
Manlio PerilloApr 22, 2008 1:25 pm 
Manlio PerilloApr 22, 2008 1:27 pm 
Francisco ValladolidApr 22, 2008 2:12 pm 
Cliff WellsApr 22, 2008 2:43 pm 
Sean AllenApr 22, 2008 3:10 pm 
Jay ReitzApr 22, 2008 10:13 pm 
Aleksandar LazicApr 22, 2008 11:06 pm 
Aleksandar LazicApr 22, 2008 11:09 pm 
Aleksandar LazicApr 22, 2008 11:18 pm 
Mike CrawfordApr 25, 2008 2:02 pm 
Igor SysoevApr 25, 2008 10:46 pm 
Aleksandar LazicApr 25, 2008 10:56 pm 
Igor SysoevApr 25, 2008 11:53 pm 
Manlio PerilloApr 26, 2008 2:59 am 
Igor SysoevApr 26, 2008 3:22 am 
Manlio PerilloApr 26, 2008 3:45 am 
Manlio PerilloApr 26, 2008 4:24 am 
Manlio PerilloApr 26, 2008 7:37 am.c
Manlio PerilloApr 26, 2008 8:28 am 
Igor SysoevApr 26, 2008 8:57 am 
Adrian PerezApr 26, 2008 9:52 am 
Manlio PerilloApr 26, 2008 10:42 am 
Mike CrawfordApr 28, 2008 8:05 am 
Adrian PerezMay 4, 2008 10:40 am 
Subject:Re: How to redirect back to domain name when proxying
From:Igor Sysoev (is-G@public.gmane.org)
Date:Apr 25, 2008 10:46:44 pm
List:ru.sysoev.nginx

On Fri, Apr 25, 2008 at 05:03:00PM -0400, Mike Crawford wrote:

I'm using proxy_pass to tomcat for one of my webapps.

The problem is that when the tomcat app calls a single-sign-on application (CAS), CAS redirects back to the tomcat application at 'http://<ip_addr>:<tomcat_port>/app' rather than www.mydomain.com/app.

How can I configure the proxy_pass so that my tomcat application presents itself to other applications as www.mydomain.com/app ?

I'm trying to understand the proxy documentation but I can't figure out a solution. I've tried:

location /app/ { proxy_pass http://<tomcat_server_name>:8089; proxy_redirect http://<tomcat_server_name>:8089/app/ www.mydomain.com/app; proxy_redirect on; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

AND

location /app/ { proxy_pass http://<tomcat_server_name>:8089; proxy_redirect http://<tomcat_server_name>:8089/app/ www.mydomain.com/app; proxy_redirect on; }

Remove "proxy_redirect on", there is no special keyword "on". And use proxy_redirect http://<ip_addr>:<tomcat_port>/app www.mydomain.com/app; or proxy_redirect http://<ip_addr>:<tomcat_port>/app /app;