« Back

Prerequesites

installing node.js and iisnode

First you'll want to get iisnode up and running, fortunately that's quite easy to do.
You'll want to grab and run the latest installer for node.js.
Now make sure you have the URL rewrite module for IIS intsalled.
After that it's just a matter of running the iisnode installer.
To make sure you have everything working run %programfiles%\iisnode\setupsamples.bat and use your browser of choice to navigate to http://localhost/node.

installing Ghost

To get ghost running extract the downloaded source to the directory you want ghost to live in. I chose C:\inetpub\iisnode\ghost so I have all applications running under node in one place.

Once extracted make sure you have granted IIS_IUSRS group read & execute, list, and write permissions on your directory. I actually ran into problems when installing ghost because I hadn't setup the permissions properly.

Next you need to open up a cmd-prompt, navigate to your ghost directory and run npm install --production.

configuring iisnode

We need a web.config file in our Ghost root-directory.
I copied mine from http://philipproplesch.de/

<configuration>  
  <system.webServer>
    <handlers>
      <add name="iisnode" path="index.js" verb="*" modules="iisnode" />
    </handlers>
    <defaultDocument enabled="true">
      <files>
        <add value="index.js" />
      </files>
    </defaultDocument>
    <rewrite>
      <rules>
        <rule name="Ghost">
          <match url="/*" />
          <conditions>
            <add input="{PATH_INFO}" pattern=".+\.js\/debug\/?" negate="true" />
          </conditions>          
          <action type="Rewrite" url="index.js" />
        </rule>
      </rules>
    </rewrite>
    <!--
      See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for information regarding iisnode specific configuration options.
    -->
    <iisnode node_env="%node_env%" loggingEnabled="false" debuggingEnabled="false" devErrorsEnabled="false" />
  </system.webServer>
</configuration>  

configuring Ghost

Since you are using iisnode we need to change the configs of Ghost a little.
Open up config.js and under config.developement.server change port from whatever it is to "process.env.PORT" as shown below.

   config = { 
      developement : {
      ...
         server: {
            // Host to be passed to node's `net.Server#listen()`
            host: '127.0.0.1',
            // Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
            port: process.env.PORT
        }

You also want to change the "url" setting so that it points to wherever you are hosting your blog.
Note that Ghost runs in developement mode by default, so far I haven't been able to find out what the difference is besides a different set of configs.
If you want to change the staging you can either change the NODEENV variable directly or open up the web.config we created earlier and change the value of the nodeenv attribute in the <iisnode /> to production.

configuring IIS

Everything that's left to do is to create a new application that points to your ghost install and you are good to go.
add application

why Ghost

I don't know, it seemed like a good choice.
If I hadn't gone with Ghost I'd have used miniblog - I haven't used either before, so I might still switch.