TWRAM

I currently own 3 domains, one of which you are visiting now.  Another domain I own is much less useful, and really was the result of a joke.

I have until now hosted it on a Windows Server, and wanted to move it to Azure.  It isn’t a very complicated as it is just a single page.  I had help building it many years ago, and the key element on the page was a (yuck) Flash image. 

So I started out the afternoon with the desire to move it to Azure, into a storage account, and serve it up as static web content.  Easy.  No problem.  Except…

The original home doesn’t have https.  Why would it?  It is around 15 years old and has a single static page.

It also has a Flash swf as the primary element.  Well, that isn’t good.

I also don’t like to do things the easy way, because I like to take easy things and  use them to understand more complicated concepts.

So… here goes:

First to fix the page, so that it isn’t using flash.  I could just put a static image, but in this case, that just feels wrong.  So in a ‘flash’ of brilliance, I asked my friend which tool he uses/recommends for creating gif files.  He said he uses ‘gifcam’ and then since I asked him he went and found another one in just a few minutes.  He now uses (and I used) ‘screentogif’.  You can find it with a quick search.

So I used screentogif to record the swf and then save it as a gif.  (Link to the results at the bottom).  One problem down, two (at least) to go.

Next I went through this tutorial (sort of) to figure out how to configure Blob Storage to host static web content. 

So I created the storage account, enabled Static website, and set the default document name.  I already had content, so I didn’t need the ‘hello world’ part.  I was going to work on integrating this deployment into a CI/CD pipeline, but bailed on it because I found a link on the page that needed to be updated (it wasn’t safe for work, though it had been originally).  I needed to get this deployed and replace the current site.

Using VS Code to deploy works very well per the tutorial.  I will work on the CI/CD part for one of the other sites I need to move.

Next problem, repointing my DNS.  Easy, just follow the next tutorial.  Which is where I hit the problem with HTTPS vs HTTP.  I could easily just not require a secure connection and get it to work, but I want to move my stuff to HTTPS because it is good practice.

But to do that you have to enable Azure CDN for your blob or web endpoint.  So on to the next article.  At least Microsoft is getting better with their documentation, and this part is pretty straight forward.  Once you follow a couple of steps, you get your content served up via CDN over HTTPS. 

Next, we need to add the custom domain to the CDN endpoint.  That article is here.  In the article, it talks about how to do a temporary mapping to avoid down time.  None of my sites are critical.  Downtime isn’t an issue, so I skipped that part.

Once I swapped over to the CDN location, the site was available via HTTPS, but there was a certificate error.  to fix this, click on the CDN Custom Domain, and turn on the custom domain HTTPS.  It is evidently free and managed by Azure.

image

That process takes a few minutes and you should have your CNAME in place before you kick it off, so that you don’t have to wait for an email to authorize it.

I know that this has been a long post, and if I wasn’t lazy, I would break it up into multiple posts, with more pictures.  But, I am lazy, so this is what you get.

https://www.theworldrevolvesaroundmichael.com/

Leave a Reply