Пытаюсь настроить nginx как прокси для порта 8080 (jenkins).
nginx и jenkins - в докер-контейнерах.
Конфиг nginx (взят с https://wiki.jenkins-ci.org/display/JENKINS/Jenkins behind an NGinX reverse p...):
server {
listen 80;
server_name jenkins.domain.tld;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the "It appears that your reverse proxy set up is broken" error.
proxy_pass http://127.0.0.1:8080;
proxy_read_timeout 90;
proxy_redirect http://127.0.0.1:8080 http://jenkins.domain.tld;
}
}
Ошибка:
nginx_1 | 2015/08/12 17:12:34 [error] 6#6: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.42.1, server: jenkins.domain.tld, request: «GET / HTTP/1.1», upstream: "http://127.0.0.1:8080/", host: «jenkins.domain.tld»
Что не так?
PS. Jenkins на 127.0.0.1:8080 работает.
PS2. 'jenkins.domain.tld' прописано в /etc/hosts, идет на 127.0.0.1