'Http request from one application to another via Nginx
I have just started with Nginx, kindly bear with me.
My scenario is one application is sending Http request to another ( both deployed on Jboss). I want to pass this request via Nginx.
The request url in normal case ( where it is working as expected) :
https://localhost:8443/AppName/serviceName/methodName
I am using Nginx as docker container and the entry in the compose file looks like
nginx-container:
image: nginx:1.13
ports:
- "8083:80"
volumes:
- './ngnix.conf:/etc/ngnix/nginx.conf'
networks:
default:
aliases:
- 'nginx-container.localhost.localdomain'
depends_on:
- jboss
The nginx.conf looks like
events { worker_connections 1024;}
http {
upstream app {
server jboss:8080;
}
}
I have configured my appliaction so that the request goes through port 8083 ( assigned for Nginx), and so the request url now looks like
https://localhost:8083/AppName/serviceName/methodName
But I am receiving
java.net.ConnectException: java.net.ConnectException: Connection refused (Connection refused)(https://localhost:8083/AppName/serviceName/methodName)
I am sure I have done ( many) things wrong, but so far unable to pinpoint it. Any help is appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
