Report this

What is the reason for this report?

Virtualhost subsomains don't work with Dokku

Posted on June 23, 2014

I am using an Ubuntu 14.04 machine with Dokku installed. I followed the instructions in these tutorials

https://www.digitalocean.com/community/tutorials/how-to-use-the-dokku-one-click-digitalocean-image-to-run-a-ruby-on-rails-app

https://www.digitalocean.com/community/tutorials/how-to-set-up-and-test-dns-subdomains-with-digitalocean-s-dns-panel

And made sure to setup subdomains and everything else. The issue is I deployed a Rails app to a fresh Droplet and it was launched at the root of my hostname, rather than at the subdomain, as I thought it would.

In addition, when I go to this address:

sample.domain.com

It says the host name could not be resolved.

So I created a second app and deployed that too. Same thing at the subdomain of app 2.

Then I checked the docker processes, and I see this:

dokku/sample2:latest 0.0.0.0:49155->5000/tcp dokku/sample:latest 0.0.0.0:49153->5000/tcp

Both apps are mapping to the same port. Ok, I guess that’s ok as long as the virtualhosts work. But they don’t. So I don’t know what else to do.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Remember to check the box labeled “Use virtualhost naming for apps” when you first browse to the IP address. The seu up view looks like:

If you don’t, then you will have to access the apps over their port instead of by subdomain.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.