Answer the question
In order to leave comments, you need to log in
Why does a direct link to the site work, but not when proxying through proxy_pass?
There is a site api.site.ru.
I want to set up proxying in nginx, from site.ru to api.site.ru. I write in the config:
server {
server_name site.ru;
...
location /api/ {
proxy_pass http://api.site.ru;
}
...
}
upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: site.ru, request: "GET /api/request HTTP/1.1", upstream: "http://yyy.yyy.yyy.yyy:80/api/request", host: "site.ru"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question