Setting up your own Blog site
This post is to help you setup your own blog site using Ghost platform on Azure. Ghost is a open source, adaptable publishing platform for building and running modern online publications. It takes care of the manual process of building and maintaining the blog site where the author can focus mainly on the content that he/she wishes to publish.
The following things are required to get started with blogging:
- Azure Subscription (get free azure subscription).
- your custom domain name (get your domain from GoDaddy)
STEP 1 : Creating your blog site using Ghost on Azure
Open GitHub repository for Ghost-Azure
Fill out the required information:
- Azure Subscription from dropdown.
- Resource group in which the site will be created.
- Site name of your choice (subject to availability)
Once the deployment is successfully finished your site is deployed on azure and can be accessed via YourSiteName.azurewebsites.net
STEP 2 : Linking your site with your custom domain name
Go to your domain provider, select your domain and click on manage DNS. You would reach a page similar to the one shown below.
You need to add the following into DNS records
1. A @ IP address of your web app.
- CNAME * YourSiteName.azurewebsites.net
- CNAME www YourSiteName.azurewebsites.net
- TXT @ YourSiteName.azurewebsites.net
Now go to your Application in azure portal and then to the Scale Up tab.
Now go to the custom domain tab and add new host name
Now your custom domain is linked to your site that you hosted on azure.
STEP 3. Getting SSL certificate
We would use azure's Let's Encrypt to get SSL certificate for our site.
In your Azure Portal go to Azure Active Directory then click on App Registration tab and the begin a new Application registration.
Register this app with any name, keep application type as Web App/API and provide your custom domain for Sign on URL.
The Application ID of this App is the Client ID that would be required later in the process.
Now go to settings button in the above page and then Keys tab to generate new Keys.
Provide key description, its expiry date and the value. Save the generated key as this will be used later as client secret.
Go to the resource group containing application corresponding to the site and provide the application registered in the Azure active directory (Let's Encrypt) and provide "Contribute" access.
To do this go to resource group and then Access Control (IAM) tab.
Go to the App service and then to the extension tab and add Azure Let's Encrypt extension in it.
Open Azure Let's Encrypt extension and click on browse.
- the tenant is something like mytenantname.onmicrosoft.com, you can find out your tenant tname by hovering over the logged in used in your azure portal.
- Subscription ID is your app service's subscription ID
- Client ID and Client secret were stored by us previously in the demo.
- Resource group name and service plan resource group name is the resource group in which you had deployed the app service.
Once you fill all the details click next. You would have to verify the domain and generate certificates for your domain which will be installed automatically.