Answer the question
In order to leave comments, you need to log in
Nginx - why are locations not working as expected?
I have a set of containers, Nginx works as a reverse proxy. The configuration looks like this
events { }
http {
client_max_body_size 100M;
server {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
server_name somedomain.com localhost;
location /api/core {
proxy_pass http://ff_corecomp:3800;
}
location ~ (/api/parse|/api/social) {
proxy_pass http://ff_socialcomp:3800;
}
location /api/video {
proxy_pass http://ff_videocomp:3800;
}
}
}
ff_videocomp_1 | INFO: 172.18.0.7:52666 - "GET /api/social/generate_204 HTTP/1.0" 404 Not Found
ff_nginx_1 | 172.18.0.1 - - [27/Aug/2020:12:31:26 +0000] "GET /api/social/generate_204 HTTP/1.1" 404 22 "-" "python-requests/2.24.0"
Answer the question
In order to leave comments, you need to log in
Apparently, the configuration was simply not applied, something related to the docker. I cleaned everything ( https://gist.github.com/bastman/5b57ddb3c11942094f... ), rebuilt everything, now everything works
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question