J
J
jeruthadam2017-09-04 03:57:58
Nginx
jeruthadam, 2017-09-04 03:57:58

Why doesn't 2 proxy_pass work?

This instruction clearly states that you can add more than one proxy_pass via location /***
https://www.digitalocean.com/community/tutorials/h...
I did just that. Launched elementary 2 Noda services, on different ports, each of which returns a phrase.

server {
  listen 80;
  listen [::]:80;

  server_name мой.домен;

   location / {
     proxy_pass http://localhost:5000;
  }
  location /test {
    proxy_pass http://localhost:5001;
  }
}

But it doesn't work. Only the route works /
Based on the article, then мой.доменone should return to me at the address, and мой.домен/testanother at the address.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lynn "Coffee Man", 2017-09-04
@jeruthadam

Does your application on localhost:5001 expect the request to come to /test and not / ?
I'm 99% sure not.
I recommend reading the documentation in particular after "The request URI is passed to the server like this ".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question