Redirection

imrickysingh nginx-forum at forum.nginx.org
Thu Feb 22 13:17:54 UTC 2018


Hi guys,

I am new to nginx and facing some problem with my setup.

In my setup i have nginx and tomcat with the application running on tomcat
as http://tomcatdomain/application_name. I want to redirect to application
if someone hit http://nginxdomain/app. I am able to do the redirection using
location block as:

location /app {
  proxy_pass $tomcatdomain;
  proxy_set_header Host $host;
  proxy_pass_request_headers  on;
}

http://nginxdomain/app gives default tomcat page but i am not being able to
reach the application.
If i do like: http://nginxdomain/app/application_name, then it doesn't go
anywhere but gives me the default tomcat page



Regards,
Ricky Singh

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278722,278722#msg-278722



More information about the nginx mailing list