How to change the default application in Dokku for the domain host name

As a personal project, I deployed a Dokku image to Digital Ocean and got everything that works well. It actually works very well, as I did before, but I have a question about how I can change what the β€œstandard” application points to the domain host name.

Here is my setup.

  • I installed Dokku on Digital Ocean with the "Hostname" and "Virtualhost Naming" options selected. So basically this means that I have my own domain name used to specify applications instead of IP / Port. Suppose my domain name is mydomain.com

  • I have two Dokku applications running on this Digital Ocean server. Let's call them app-a and app-b . Since I have included "virtual naming", such applications can be accessed like this.

    • app .mydomain.com
    • app-b .mydomain.com

This all works great.

  1. List item

Now I notice that if I go to "mydomain.com" or "www.mydomain.com" in the browser, it "defaults / redirects with masking" to " app-b .mydomain.com". I assume that since application-b was the last application I installed, NGINX refused by default.

, , .. "mydomain.com" "www.mydomain.com" "app-a"?

.

.

+4
1

dokku HOST nginx.

, , domains

# add a domain to an app
dokku domains:add app-a mydomain.com

$ git remote add dokku dokku@dokku.me:mydomain.com
$ git push dokku master

dokku "00-default". , vginus nginx .


:

+9

Source: https://habr.com/ru/post/1611374/


All Articles