0

I have an angular app running in HTTPS and am using nginx as my webserver. I would like to connect to the private IP using HTTP but I get an error that it is not able to connect.

I'v tried changing my nginx.conf file to route to the IP address but it is routing to my localhost

.conf file looks as follows:

daemon off;


   http{

    server {

      listen 9000;

      location /home {
          proxy_bind 192.xyz.abc.de;
          proxy_pass http://192.xyz.abc.de:8080/home/json;
      }

      location / {
          alias /usr/src/;
      }

  }

  include /etc/nginx/mime.types;
  gzip on;
  gzip_proxied any;
  gzip_comp_level 5;
  gzip_buffers 128 16k;
  gzip_types text/plain text/css application/json application/javascript text/javascript text/xml;
  error_log  /var/log/nginx/error.log debug;
}

events {
  worker_connections 1024;
  use epoll;
}
user5870571
  • 3,094
  • 2
  • 12
  • 35

1 Answers1

0

This problem was fixed by taking out json from proxy_pass http://192.xyz.abc.de:8080/home/json address and taking proxy_bind key value out of the json file.

replaced /home with /home/