tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: mod_proxy not redirecting servlet redirect properly
Date Thu, 05 Dec 2013 16:49:25 GMT
Konstantin Kolinko wrote:
> 2013/12/5 Ponmani <nvragh@yahoo.co.uk>:
>> Hi
>>
>>
>>
>> I am very new to mod_proxy. Gone thru some tutorials and configured mod_proxy. Everything
works great except this issue. Couldn't solve even after spending hrs in googling. Issue is
- I have apache 2 in front of tomcat 6 (running in port 8080) in my internet website. I am
using mod_proxy to mask the port 8080. In one of the servlets POST method i am redirecting
the request to a JSP page but port 8080 is displayed in the URL as follows after successful
redirect http://myip.com:8080/myapp/WebContent/result.jsp?message=success
>> Couldn't figure out how to avoid it. Here is my httpd conf entry
>> <VirtualHost *:80> ServerAdmin sharad@example.com ServerName http://myip ServerAlias
http://myip ProxyPass /myapp http://myip:8080/myapp ProxyPassReverse /myapp myip:8080/myapp
ProxyPass /myapp ! RedirectMatch 301 ^/myapp/(.*)$ /$1 RedirectMatch 301 ^/myapp$ /
>> </VirtualHost>
>> Can someone pls. let me know what the problem is? thanks
> 
> http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
> See "proxyPort" attribute.
> 

And (to the OP) :
Your message is quite hard to read.
But from what I can see of your config above :
- ServerName is wrong, it should just be "myip"
- ServerAlias is also wrong, for the same reason.  But it is also superfluous, as it is 
the same as ServerName. You need a ServerAlias only if you have a different hostname.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message