1

my nginx.conf file :

  location /XYZ/ {
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header User-Agent $http_user_agent;
            proxy_pass http://xyz:83;
            proxy_redirect http://xyz:83/xyz/ /;

   }

    location = /ABC/ {
           proxy_set_header X-Real-IP  $remote_addr;
           proxy_set_header X-Forwarded-For $remote_addr;
           proxy_set_header Host $host;
           proxy_set_header User-Agent $http_user_agent;
           proxy_pass http://abc:89/abc/;
           proxy_redirect http://abc:89/abc/ /;
    }

if a request comes to XYZ java service , along with xyz a http call should be made to ABC java service simultaneously...

can this be happen in nginx ?

both the java services are running in Docker

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
avinash
  • 11
  • 1

1 Answers1

0

you might be able to use rewrite_by_lua_file to initiate a request to /ABC