The inside in Hypercare, Healthcare, and Entrepreneurship.

Setting up Ghost on Azure

Setting up Ghost on Azure

Setting up Ghost on Azure

What's Ghost?

Overview

Ghost is a simple open source blog hosting platform that we use to host our blog (the one you are on now!). It is competing against Wordpress.

Why Ghost?

I have always used Wordpress even from the beginning of the ages. I used Wordpress right when it came out, before it had their own hosting. However, over time I realized the strain it puts on me making sure to update all the plugins, the themes, Wordpress itself, etc. It has been too complex. I wanted to have a healthy balance between control (so no Medium, Tumblr) but also ease of use and low complexity. Don't get me wrong Ghost is a little difficult to setup, and some of the customization is a little more difficult than Wordpress but overall -- writing a simple post is a lot more simple.

Full Azure Setup for Ghost

I will be speaking about setting up ghost through Azure. I will not go in depth on parts where I believe others have done a fabulous job with tutorials.

Setup Ghost Image

Deploying ghost as a web application with Azure is super simple. Go on this Github created by Felix called Ghost-Azure:https://github.com/felixrieseberg/Ghost-Azure. Press the deploy to Azure will take you through the setup. This image also takes a while to deploy so please do not be surprised if your website does not load properly after the setup for around 5 minutes.

After the setup is completed, you can configure a custom domain by changing websiteUrl. Keep in mind, for the websiteUrl is in a format like this http://blog.gethypercare.com not blog.gethypercare.com or else it will not work.

Setting up SSL

Easiest way is to buy a ssl certificate with Azure, but since I am trying to keep my cost down I went the Let's Encrypt route. Using an app service has downsides which is the confusing aspect of managing it. Thankfully, someone created an amazing extension with an amazing tutorial that walks you through this.
https://github.com/sjkp/letsencrypt-siteextension/wiki/How-to-install.

Now, you will be stuck in the place after configuring everything properly getting the error that it cannot access .well-known.

All you have to do here is to change your web.config (this part you will need ftp credentials so go create them!) to have this:

<rule name="LetsEncrypt Rule" stopProcessing="true">
    <match url="^\.well-known.*$" />
    <action type="None" />
</rule>

Put this right under where you see <rules>. Now I would comment this out briefly (your blog will not work for time being):

<rule name="StaticContent">
    <action type="Rewrite" url="public{REQUEST_URI}"/>
</rule>

Try to continue the process of issuing the license and it should be successful! This tip is from: https://github.com/Lone-Coder/letsencrypt-win-simple/wiki/web.config

Awesome! This should all be clear to go. Last step is to go back and configure in App Setting in Azure Portal with a key WebUrlSSL to your https domain e.g. https://blog.gethypercare.com! Lastly, go and remove your commented out portion in web.config and remove the LetsEncrypt Rule since it will break your blog! You should be good to go now. Additional things are installing other templates, or forcing SSL redirect (Todo on my list).

One great open source template can be found here.

This was definitely trickier than I thought but now you can set up new app services with SSL in a very quick manner.


Albert Tai

Albert Tai

An advocate of Customers + Believer of Strong Products.

Enter your email below to join our newsletter

comments powered by Disqus