Skip to content

Hosting Journey as a Windows Azure Web App

Kai H edited this page May 15, 2015 · 24 revisions

1. Create a new Web App

Log into the Azure Portal.

Click on "+ NEW" in the bottom left corner. Then click on "Web + Mobile" -> "Web App" and fill out the form.

Your web app is now being created. After that's done, click on it in your portal "Home" page.

2. Download and extract Journey

NOTE: To make the following steps easier, you should log into the Kudu console of your Web App which lets you paste into the console, edit files, use tab completion, and much more. Do that by visiting https://<yoursite>.scm.azurewebsites.net and logging in with your Azure credentials. Then go to "Debug Console"->"CMD" and change into D:\home\site\wwwroot with cd site\wwwroot or by clicking on the folders in the directory structure above the console.

If you can't or won't use the Kudu console, you may stay on the Azure Portal. On your newly created Web App page, scroll down to the "Operations" section and click on "Console".

You will be presented with console access to your web app. In the following, we will assume the console is in the D:\home\site\wwwroot directory.

Go to the Journey releases page and look up the link to the latest "journey-windows-386.zip" (the 32 bit version for Windows, you need at least Journey 0.1.9 to run it as an Azure Web App).

NOTE: Depending on the plan you use with you Web App, you either need to use the 32 bit version of Journey (Free and Shared) or may try the 64 bit version of Journey (Basic and above). To use the 64 bit version, 64 bit mode should be enabled under Azure Portal "Home"->Your Web App name->"All Settings"->"Application Settings"->"Platform".

Let's assume the link goes to https://github.com/kabukky/journey/releases/download/v0.1.9/journey-windows-386.zip. In the web app console, change to D:\home\site\wwwroot and run

curl -L -O https://github.com/kabukky/journey/releases/download/v0.1.9/journey-windows-386.zip

to download the zipped Journey release. Then run

unzip journey-windows-386.zip

to extract the zip file. Finally, rename the extracted folder to "journey" by running:

rename journey-windows-386 journey

All the extracted files (including journey.exe) should now be located under D:\home\site\wwwroot\journey\.

You may now delete the zip file:

rm journey-windows-386.zip

3. Configure Journey

Now you need to edit Journey's config.json file which is located under D:\home\site\wwwroot\journey\config.json. We will use Kudu (see above) for that.

In the Kudu console, navigate to D:\home\site\wwwroot\journey and click on the pencil ("Edit") icon next to the config.json file in the directory structure above your console.

Change the text to reflect the following (replace every occurrence of <yoursite> with the name of your Azure Web App)

{
	"HttpHostAndPort":":8084",
	"HttpsHostAndPort":":8085",
	"HttpsUsage":"None",
	"Url":"http://<yoursite>.azurewebsites.net",
	"HttpsUrl":"https://<yoursite>.azurewebsites.net"
}

then save the file.

NOTE: "HttpsUsage" needs to remain as "None" as HTTPS is handled by Azure, not Journey. If you'd like your blog to be served over HTTPS, you should set "Url" to "https://<yoursite>.azurewebsites.net" as well. To enforce HTTPS for your Azure Web App, see the section "Enforce HTTPS on your web app" on this site.

4. Configure the Web App

Next, you have to create a D:\home\site\wwwroot\Web.Config file that will tell your Web App to use Journey. It has to have this content:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
        </handlers>
        <httpPlatform processPath="d:\home\site\wwwroot\journey\journey.exe"
        arguments="-log=d:\home\site\wwwroot\journey\log.txt -http-port=%HTTP_PLATFORM_PORT%"
        startupTimeLimit="60">
        </httpPlatform>
    </system.webServer>
</configuration>

You could use Kudu (see above) to create and edit the file OR you could simply download the Gist that I provided as a convenience. To do that, change into D:\home\site\wwwroot and run

curl -L http://bit.ly/1bMqG0X --output Web.Config

to save the content of that Gist to Web.Config.

5. Use Journey

Don't start the journey.exe manually! IIS will do that for you (we just told it that in the Web.Config). So just visit http://<yoursite>.azurewebsites.net in your browser and you'll be presented with your new Journey blog in all its glory.

To create your admin account, visit

https://<yoursite>.azurewebsites.net/admin/

and enter your details. Remember to always use HTTPS when logging into the Journey admin panel or your credentials will be transferred in clear text.

6. Customize your blog

The Promenade theme is included by default to make Journey work out of the box. However, it is only intended to be used on a one author, personal website.

For a fully fledged blog experience try the Casper theme from the makers of Ghost.

Download it, then use the Kudu console to navigate to D:\home\site\wwwroot\journey\content\themes. Drag and drop the Casper zip file you just downloaded into the directory structure above the console.

This will create a Casper folder with the contents of the zip file. No unzipping! Isn't Kudu great? :)

Go to your admin panel (https://<yoursite>.azurewebsites.net/admin/) and select the Casper theme under Settings/Blog.

After that, try some other themes! There's a whole world of Ghost themes out there. Find the one you like best.

7. Write your own theme or plugin

Finally, you can always write your own theme and use it with Journey. Start by visiting http://themes.ghost.org and by reading one of the many tutorials that show you how to create a Ghost theme!

If you're interested in writing a plugin, head over to Creating a Journey Plugin!