New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dokku with virtual host enabled and trying to secure main app uses subdomain URL and fails #146

Open
TomasHubelbauer opened this Issue Mar 13, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@TomasHubelbauer

TomasHubelbauer commented Mar 13, 2018

I only have a single app running in Dokku and I access it through hubelbauer.net. When running dokku domains:report I get this:

=====> bloggo domains information
       Domains app enabled: true
       Domains app vhosts:  bloggo.hubelbauer.net
       Domains global enabled: true
       Domains global vhosts: hubelbauer.net

So the sole app running in the Dokku instance is running directly on the domain instead of running on a subdomain. I can't access the app at bloggo.hubelbauer.net or anything like that.

I have Dokku v0.11.4 installed and I ran this to install Let's Encrypt:

dokku plugin:update letsencrypt
dokku config:set --no-restart bloggo DOKKU_LETSENCRYPT_EMAIL=tomas@hubelbauer.net
dokku letsencrypt bloggo
dokku letsencrypt:cron-job --add

This has failed with the following error:

Unable to reach http://bloggo.hubelbauer.net/.well-known/acme-challenge/…

So it seems like it uses the subdomain URL but since I have virtual host enabled in Dokku and this is the main app, it should try to access it through the hubelbauer.net URL.

How can I tell the Let's Encrypt plugin to use the working domain name as opposed to the subdomain?

@TomasHubelbauer

This comment has been minimized.

TomasHubelbauer commented Mar 13, 2018

I followed Generating a Cert for multiple domains and now my dokku domains:report gives this:

=====> bloggo domains information
       Domains app enabled: true
       Domains app vhosts:  bloggo.hubelbauer.net hubelbauer.net
       Domains global enabled: true
       Domains global vhosts: hubelbauer.net

I rerun dokku letsencrypt bloggo, but it failed with the same error even though the domain setup looks correct now for the default app.

@zeroxcharlie

This comment has been minimized.

zeroxcharlie commented Jul 19, 2018

Hi, I'm currently having the same problem, did you manage to solve it?

@TomasHubelbauer

This comment has been minimized.

TomasHubelbauer commented Jul 20, 2018

Unfortunately, not. Dokku with default app and subdomain apps has been acting very weird for me in this regard as well as with how Google scrapes the sites. Essentially GoogleBot saw content of one site on a subdomain of another. I am planning on reimaging the server and retrying with the latest version at some point. I'll report back here with results.

@zeroxcharlie

This comment has been minimized.

zeroxcharlie commented Jul 30, 2018

I just solved my problem!! All i had to do was the following:
where someapp is your app name, and both example.com and www.example.com are your domains
dokku domains:set someapp example.com www.example.com
then
dokku letsencrypt someapp
and you should be good to go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment