our product have 12 micro services running on 2 servers in private VPC...i have configured nginx in same private VPC and edited nginx.conf like below...

    server {
        listen 80;
        location / {
            proxy_pass http://ip1:8080;
        location /comments {
            proxy_pass http://ip1:8080/comments-api/health;

        location /business {
            proxy_pass http://ip2:8080/business-rules-api/health;

        location /items {
            proxy_pass http://ip2:8080/items-api/health;

i can see that nginx is serving the traffic to IP1 API however for server2(ip2) API i am getting http stats 404 not found..there is nothing wrong with the code as we havE tested same code in in different VPC.. i have also checkED whether i can curl to Ip2 api from nginx server...ports are open...i am not finding any solution here...can anyone please pick this and help me...

thanks in advance.. Ajith Reddy

  • 1
    Try /whatever, which rule will it match first ? the /, so everything is directed to the first entry. – Tensibai Jul 3 '18 at 14:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.