nginx reverse proxy

chima s chima.s at gmail.com
Sat Mar 22 08:04:09 UTC 2014


Hi,

I have configured nginx as reverse proxy for jboss. All the system are
hosted in Amazon cloud and using AWS ELB for both nginx and jboss


WEB ELB <---> nginx reverse proxy <---> APP ELB <---> Jboss7.

When i access abc.example.com/admin/login.do, i am getting page and after i
provide username/password and submit,  i am getting connection timeout.

Found the URL get changed to abc.example.com:8080/admin/xxxx

How to get rid of port 8080 in the response URL in nginx.

Below us the nginx-1.4.7 proxy configuration:

upstream appserv {
        server 192.168.1.100:8080 fail_timeout=0;
}

proxy_set_header    X-Real-IP   $remote_addr;
proxy_set_header    Host        $http_host;
proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://appserv/;
proxy_redirect http://appserv/ $scheme://$host/;
proxy_set_header Connection '';


Also tried with
proxy_redirect default
and
proxy_redirect http://appserv/ $scheme://$host:80/;

still got the same issue

Thanks
Chima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20140322/d44c1fd8/attachment.html>


More information about the nginx mailing list