Answer the question
In order to leave comments, you need to log in
Why doesn't redirect to container from nginx work?
Good day!
There are two containers in one nginx in another redmine.
Redmine has a port open and if you access this port directly from a browser, then everything is ok.
Installed a container with nginx.
Created a config:
server {
listen 80;
server_name myhost.ru www.myhost.ru;
error_log /etc/nginx/logs/debug.log debug;
location /test {
rewrite ^/test/?([^/]*) /$1 break;
proxy_pass http://localhost:10083;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Answer the question
In order to leave comments, you need to log in
Remove this line and it will work.rewrite ^/test/?([^/]*) /$1 break;
upstream server temporarily disabled while connecting to upstream, client: 10.80.2.244, server: myhost.ru, request: "GET /test HTTP/1.1", upstream: "127.0.0.1:10083", host: "myhost.ru"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question