Heroku multiple SSL endpoints
I recently worked on a project, hosted on Heroku, that required multiple SSL endpoints. The application allows you to set a custom URL for your account. This isn’t exactly straightforward on Heroku. In order to pull this off, I got some help from the Heroku Support team. I’m reblogging here so other folks can benefit.
The problem is that, at the moment, you can only add one SSL endpoint to a Heroku application. This prevents you from being able to have multiple SSL URL’s point to the same Heroku application. However, it turns out you can create an empty Heroku application and add the SSL addon to get another endpoint. Then simply setup the DNS like usual and add the new domain to your original application.
Let’s say tumblr.com is hosted on Heroku. And let’s say I’d like to setup a special page for support, at support.tumblr.com. To do this, we would create a new, empty, Heroku application, add the SSL addon and upload our certs for support.tumblr.com. Heroku would setup a new SSL endpoint for the application and return our new URL for DNS, purple-44.herokussl.com. We would setup a CNAME DNS record from support.tumblr.com to purple-44.herokussl.com, as you would normally do for a new domain on Heroku. The one trick to making this all work is that we add the domain for our custom URL to the our tumblr.com Heroku application, NOT the new support.tumblr.com application.
So, when a request comes in for support.tumblr.com, DNS resolves to purple-44.herokussl.com, and we correctly hit the routing mesh. The routing mesh will lookup which Heroku application to send the request to, see that requests to support.tumblr.com should go to tumblr.com, and route the request accordingly.
This is the hack that allows you to use multiple SSL endpoints on Heroku.
Thanks Heroku support team for the help! I was not excited about having to move to a new hosting provider!
Peter Thiel’s CS183: Startup - Class 2 Notes Essay
Here is an essay version of my class notes from Class 2 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.
CS183: Startup—Notes Essay—Party Like It’s 1999?
I. Late to the Party
History is driven by each generation’s experience. We are all born into a particular culture at a particular time. That culture is like an extended dinner conversation; lots of people are talking, some lightly, some angrily, some loudly, some in whispers. As soon as you’re able, you listen in. You try to figure out what that conversation is about. Why are people happy? Why are they upset? Sometimes it’s hard to figure out.
Take someone born in the late 1960s, for instance. There was a lot going on then, culturally. But a toddler in the late ‘60s, despite having technically lived through them, essentially missed the debates on civil rights, Vietnam, and what the U.S. was supposed to look like. The child, being more or less excluded from the dinner table, would later find it hard to get a sense of what those discussions were like.
There is a keen analogue between the cultural intensity of the ‘60s and the technological intensity of the 1990s. But today’s college and perhaps even graduate students, like the toddler in 1969, may have been too young to have viscerally experienced what was going on back in 1999. To participate in the dinner table conversation—to be able to think and talk about businesses and startups today in 2012—we must get a handle on the history of the ‘90s. It is questionable whether one can really understand startups without, say, knowing about Webvan or recognizing the Pets.com mascot.
History is a strange thing in that it often turns out to be quite different than what people who lived through it thought it was. Even technology entrepreneurs of the ‘90s might have trouble piecing together that decade’s events. And even if we look back at what actually happened, it’s not easy to know why things happened as they did. All that’s clear is that the ‘90s powerfully shaped the current landscape. So it’s important to get as good a grasp on them as possible.
II. A Quick History of the 90s
Most of the 1990s was not the dot com bubble. Really, what might be called the mania started in September 1998 and lasted just 18 months. The rest of the decade was a messier, somewhat chaotic picture.
To Succeed in Life, Learn How to Fail
No one likes to fail. We feel embarrassed, angry, frustrated, self conscious, and vulnerable. But I’ve recently begun to feel comfortable with failure and started embracing it. I want to share some of my feelings about failure.
None of us want to look incompetent. And you have every right to be worried you’re incompetent because people make these sorts generalizations all the time. Human brains are terrible at complex analysis. We use shortcuts when we don’t have the time, energy, or wherewithal to use higher brain functions. It’s an evolutionary adaptation to conserve energy.
Understanding this allows you to dismiss most critics.
The Moral High Ground
Realize the power of trying and failing as a strategy for learning. Businesses are increasingly turning to this type of strategy, pioneered by Toyota in the 1980’s. Fail sooner, rather than later, and you can course-correct before you’re too highly invested. Take solace in the comfortable position that while most folks are reading Miley Cyrus gossip on BuzzFeed, you are actively learning.
By taking a risk, you have the moral high ground. No one can fault you for trying to learn something new. If you fail, you will learn.
Provide Clarity Where There is Confusion
When you embrace something different, it requires a fair amount of effort on to reconcile why you’re deviating from the norm.
Talk the confused through your reasoning and use a narrative style if possible to increase empathy. And remain humble. Over confidence in a new idea will deter people from taking you seriously.
For instance, rent in SF is crazy. I’ve had the following conversation at least 5 times in the last month.
Stranger: “How do you like living in SF?”
Me: “I love it for the most part; only downside is the rental market.”
Stranger: “Ya it is expensive.”
Me: “I’m trying to find an unconventional way to live to reduce my exposure, like a boat. My fiance and I have talked it over and we feel like it could work.”
Stranger: “Oh ya wouldn’t that be the life!”
Me: “I grew up boating so I’m comfortable with the idea. The biggest hurdle is getting ‘liveaboard’ status in a marina.”
Stranger: “Oh, you were serious! There are waiting lists?”
Me: “Ya, municipalities have placed limits on the number of liveaboard slips and I can’t buy a boat on the hope that a slip will turn up!”
Stranger: “Interesting. Well good luck!”
Learn to view your failures in an objective fashion. Try to glean as much as possible from your mistakes. Use a 5-why’s approach to understanding just how and why you failed. Understanding why something happened or didn’t happen is a self-reinforcing process. It can lead to highly satisfying Aha! moments. Embrace this type of discovery.
The context under which I mostly talk about failure is in business. But “trying” doesn’t necessitate a physical activity. One can explore philosophical problems as well. I regularly entertain dozens of ideas, talking about them for a few days, weeks, or months, bringing them up in conversation, and generally annoying my family and friends to no-end.
Here are some ideas and ideas I’ve been playing with over the last several weeks:
- Could we open source urban planning? Government? Law?
- What role does government representation play in a world with instant communication?
- How can we modernize government and make it more efficient with technology? It could be so much more lean.
- Should I stop consulting and focus on DockLister?
- Should I even be running DockLister?
- As I grow increasingly cynical about our political system, do I even want to live in the United States?
- What if I worked remote for the next 3 years, in a different city each year?
- How can I hack real estate and find cheaper rent? Live on a boat?
- How can I help Bitcoin succeed?
- How many people are required to stage a protest?
I wrote this for every person who as ever failed to raise their hand in a class because they weren’t 100% sure of their answer. I was, and still am sometimes, one of these people. On some levels, this is a pep talk for myself.
Ignore everyone and raise your hand for every question. Really.
Learn how to fail gracefully and the fear disappears.