Skip to content

SSL on Heroku #113

Closed
Closed

Description

@cben

[split off #104]
Whoops.
HTTPS://www.mathdown.net/ works.
HTTPS://www.mathdown.com/ doesn't, presents cert for *.herokuapp.com.
For the 2 apex domains it's hard to check. => with good IP in /etc/hosts, they also don't have the cert.

Wait, it's #20 more? Oh well, but I doubt I'm staying with heroku.
=> Enabled.

$ heroku certs:add --app=mathdown GENERATED-CHAINED-mathdown.com.pem ~/StartSSL/my-private-decrypted.key 
Resolving trust chain... done
Adding SSL Endpoint to mathdown... done
mathdown now served by osaka-3545.herokussl.com
Certificate details:
Common Name(s): mathdown.com
                www.mathdown.com

Expires At:     2016-02-12 05:45 UTC
Issuer:         /C=IL/CN=www.mathdown.com/[email protected]
Starts At:      2015-02-10 16:05 UTC
Subject:        /C=IL/CN=www.mathdown.com/[email protected]
SSL certificate is verified by a root authority.

$ 
heroku certs:add --app=mathdown GENERATED-CHAINED-mathdown.net.pem  ~/StartSSL/my-private-decrypted.key 
Resolving trust chain... done
Adding SSL Endpoint to mathdown... failed
 !    Only one SSL endpoint is allowed per app (try certs:update instead).

$ 
heroku certs:update --app=mathdown GENERATED-CHAINED-mathdown.net.pem  ~/StartSSL/my-private-decrypted.key 
Resolving trust chain... done

 !    WARNING: Potentially Destructive Action
 !    This command will change the certificate of endpoint osaka-3545.herokussl.com on mathdown.
 !    To proceed, type "mathdown" or re-run this command with --confirm mathdown

> ^C !    Command cancelled.

bah! I can only have one of {.com, .net} secured?!

https://stackoverflow.com/questions/13448012/multiple-ssl-certificates-in-one-heroku-application
The "easy" way is a multi-domain SAN cert. Expensive so I don't have one.
The suggestion on stackoverflow is creating a fake app (0 dynos) with separate SSL endpoint (again $20/mo!) and routing to the same app via hacky CNAME...

Activity

  1. cben commented on Aug 13, 2015

    @cben
    OwnerAuthor

    What's worse, even the cert I've added for .com is not working.
    Aha, I need to change the CNAME to osaka-3545.herokussl.com.
    [https://devcenter.heroku.com/articles/ssl-endpoint#dns-and-domain-configuration]

    Tested: Forced mathdown.com to osaka-3545.herokussl.com's IP in /etc/hosts and it works.

    => Let's give Heroku the .net cert and return .com to RHcloud.

  2. cben commented on Aug 13, 2015

    @cben
    OwnerAuthor

    done. also lowered all TTLs on DNSimple to 1min.

  3. added a commit that references this issue on Aug 13, 2015
  4. cben commented on Aug 13, 2015

    @cben
    OwnerAuthor

    (I think I knew all this once. It was one of the major reasons I went to RHcloud instead of Heroku. But i forgot because it wasn't written down.)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions