nginx proxy_pass to a linked docker container

Use an upstream block instead of the container name directly

upstream backend {
    server container1;
}
server {
    location ~ ^/some_url/(.*)$ {
        proxy_pass http://backend/$1;
    }
}

This should allow normal name resolution to occur providing a way to easily use docker links with nginx.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)