将主机动态路由到docker

时间:2016-09-13 23:42:35

标签: nginx docker routing

我试图将Web主机动态路由到LAMP docker容器。 有点如何" apache动态虚拟主机"将Web主机根据其名称(http://httpd.apache.org/docs/current/vhosts/mass.html)路由到其webroot文件夹。

我尝试使用同一VM上的nginx docker将web主机路由到具有相同主机名的docker。

1 个答案:

答案 0 :(得分:1)

这是一个很好的解决方案: https://github.com/jwilder/nginx-proxy 它不是动态的,但可以使用shell脚本配置