Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share link issue hosting Ghost blog under subfolder on Windows Azure

I have set up a ghost blog via azure marketplace, which should be the equvilant of clicking deploy to azure from https://github.com/felixrieseberg/Ghost-Azure

Let's say I have it at: theblog.azurewebsites.net/

I want it to be at https://www.mycustomdomain.com/blog and I have the main site in another app service, let's say at mainsite.azurewebsites.net/ this site has mycustomdomain.com DNS all set up with a certificate.

Within this site I have the Rewrite in the web.config

<rule name="Reverse Proxy to blog" stopProcessing="true">
  <match url="^blog(.*)" />
  <action type="Rewrite" url="https://theblog.azurewebsites.net/blog/{R:1}" />
</rule>

At the moment I am trying to get this right in the staging site so I am viewing the blog at https://mainsite-staging.azurewebsites.net/blog/

The above rewrite successfully shows me the blog hosted at theblog.azurewebsites.net without changing the url in the browser. In theblog I also have websiteUrl app setting as https://www.mycustomdomain.com.au/blog so my canonical urls are correct in the blog posts.

Remaining Problems

  1. If I click on the logo in the blog the link is to https://theblog.azurewebsites.net rather than either https://mainsite-staging.azurewebsites.net/blog or https://www.mycustomdomain.com/blog
  2. The home link, even though specified in navigation settings as https://www.mycustomdomain.com/blog is linking to https://theblog.azurewebsites.net
  3. The share links for twitter and facebook are based on sharing https://theblog.azurewebsites.net

I have searched the internet for ages...

I answered: Turns out there is also a websiteUrlSSL app setting that is not mentioned on the readme.

I just needed to set this too.

like image 243
Darren Avatar asked May 17 '17 06:05

Darren


People also ask

How do I set up a ghost blog in Azure Functions?

Give it a name, select your subscription, select the resource group your ghost blog resources are, and leave the Runtime stack as .NET. Navigate to your Azure Function and click on + New function and select In-portal and click Continue. Select Webhook + API and click Create.

Can I host my website in Azure Storage?

Hosting your content in Azure Storage enables you to use serverless architectures that include Azure Functions and other Platform as a service (PaaS) services. Azure Storage static website hosting is a great option in cases where you don't require a web server to render content. Static websites have some limitations.

How do I host static content in Azure Storage?

You can serve static content (HTML, CSS, JavaScript, and image files) directly from a storage container named $web. Hosting your content in Azure Storage enables you to use serverless architectures that include Azure Functions and other Platform as a service (PaaS) services.

Is it possible to access an azure file share via symbolic link?

For sure, the use of a symbolic link to access an Azure file share is not something that will amaze people that have been working in the cloud for a while. It is however a nice example of how the use of Azure combined with on-premises services can result in a hybrid solution that solves real-world problems


2 Answers

Turns out there is also a websiteUrlSSL app setting that is not mentioned on the readme.

I just needed to set this too.

https://github.com/felixrieseberg/Ghost-Azure/issues/57

like image 131
Darren Avatar answered Sep 27 '22 18:09

Darren


In your web.config, you can try to set the your custom domain https://www.mycustomdomain.com/blog/{R:1} instead of the Azure Web App Url. Which should rewrite the URL to your custom domain and pass through the DNS server.

And the remaining issues, I think it should be related with the ghost configurations. Please double check whether you have set the correct configuration in your ghost application, as mentioned at Custom Domain Setup

like image 20
Gary Liu Avatar answered Sep 27 '22 18:09

Gary Liu