问题描述
我在Digital Ocean Droplet上安装了Dokku,但在设置dns记录之前就安装了Dokku,因此Dokku已安装在IP上.现在,我更改了dns记录,因此可以通过 site.com
访问该站点.我可以通过 site.com:port
访问以前创建的Dokku容器,如何更改Dokku设置以访问我的应用程序- appname.site.com
I installed Dokku on my Digital Ocean droplet, but did it before setting my dns records, so Dokku was installed on IP. Now I changed my dns record, so site can be accessed through site.com
. I can access my previously created Dokku containers through site.com:port
, how can I change Dokku settings to access my app like this - appname.site.com
推荐答案
每 https://github.com/progrium/dokku:
要解决此问题,您首先需要更新/home/dokku/VHOST文件,并添加域名-这将解决所有新生成的部署,但是现有应用将需要从/home/中删除将dokku目录按名称(/home/dokku/foo,/home/dokku/bar等)重新部署以使此更改生效,因为每个Dokku应用程序在/home/dokku/路径和这些将需要重新编写.
To fix the issue, you will first need to update the /home/dokku/VHOST file, adding the domain name -- this will fix any newly generated deployments, but existing apps will need to be deleted from the /home/dokku directory by name (/home/dokku/foo, /home/dokku/bar, etc.) and redeployed for this change to take effect, since each Dokku application has a separate nginx.conf within those /home/dokku/ paths and those will need to be re-written.
这篇关于Dokku-设置后添加域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!