Skip to Content
1
Former Member
Jul 18, 2014 at 08:28 AM

How to set up NGINX to act as reverse proxy?

638 Views

Hello.

We are trying to set up our NGINX instance to act as reverse proxy. When a customer tries to login to web shop account (for example, during checkout process), hybris server sends redirects, based on an absolute path, containing its own FQDN (hyb.dmz.test.com). This works fine, as long as we are in internal network but of course does not work out of the Internet. Is there some way to change hybris behavior? What is wrong with our NGINX config snippet?

Our NGINX config sniplet:

server {

     listen XXX.XXX.XXX.XXX:443 ssl;
     server_name hybrisdemo.test.com;

     access_log  /var/log/nginx/ hybrisdemo.test.com.access.log;
     error_log  /var/log/nginx/ hybrisdemo.test.com.error.log;

     location /login {
             proxy_pass  https:// hyb.dmz.test.com:9002;
             }

     location / {
             proxy_pass  http:// hyb.dmz.test.com:9001;
             }

}

Best regards.