Welcome! Log In Create A New Profile

Advanced

Re: nginx reverser proxy tomcat with tomcat not working

Aleksandar Lazic
May 22, 2017 10:04AM
Hi AjaySawant.

AjaySawant have written on Mon, 22 May 2017 08:32:13 -0400:

> I am trying to proxy tomcat using nginx. I have this configuration
> below. Now the problem I am facing is if I access the url by
> IP(192.168.2.6) then it gets redirected to /auth_app is tomcat which
> is perfectly fine. The tomcat url redirect to a third party SAML2
> provider and once it authenticated it redirected to
> http://localhost:8080/auth_app/ instead of
> http://192.168.2.6/auth_app/ and because of that my application
> doesn't open as tomcat is running on 192.168.2.6 and not localhost.
>
> server {
> listen 80 default_server;
> server_name _;
> error_log /var/log/nginx/abc_error.log;
> access_log /var/log/nginx/abc_access.log;
> rewrite ^/?$ /auth_app;
> location /auth_app {
> proxy_redirect off;
> proxy_set_header X-Forwarded-Host $host;
> proxy_set_header X-Forwarded-Server $host;
> proxy_set_header X-Forwarded-For
> $proxy_add_x_forwarded_for;
> proxy_pass http://localhost:8080/auth_app/;
> }
> }

Please can you post the server.xml, the error log from the nginx and
the output of nginx -V.

Regards
aleks
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx reverser proxy tomcat with tomcat not working

AjaySawant May 22, 2017 08:32AM

Re: nginx reverser proxy tomcat with tomcat not working

itpp2012 May 22, 2017 08:50AM

Re: nginx reverser proxy tomcat with tomcat not working

AjaySawant May 22, 2017 11:12AM

Re: nginx reverser proxy tomcat with tomcat not working

Aleksandar Lazic May 22, 2017 10:04AM

Re: nginx reverser proxy tomcat with tomcat not working

AjaySawant May 22, 2017 11:15AM

Re: nginx reverser proxy tomcat with tomcat not working

Francis Daly May 22, 2017 11:44AM

Re: nginx reverser proxy tomcat with tomcat not working

AjaySawant May 22, 2017 12:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
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