Ho un servizio (registro docker) che funziona port 5000
, ho installato nginx per reindirizzare la richiesta http da 8080
a 5000
. Se faccio un ricciolo localhost:5000
, funziona, ma quando faccio un ricciolo localhost:8080
ottengo un errore del gateway Bad .
file di configurazione nginx:
upstream docker-registry {
server localhost:5000;
}
server {
listen 8080;
server_name registry.mydomain.com;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 0;
chunked_transfer_encoding on;
location / {
proxy_pass http://docker-registry;
}
location /_ping {
auth_basic off;
proxy_pass http://docker-registry;
}
location /v1/_ping {
auth_basic off;
proxy_pass http://docker-registry;
}
}
In /var/log/nginx/error.log
ho:
[crit] 15595#0: *1 connect() to [::1]:5000 failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: registry.mydomain.com, request: "GET / HTTP/1.1", upstream: "http://[::1]:5000/", host: "localhost:8080"
Qualche idea?