1

what I want to do is to have ghost hosted in a virtual directory or application something like:

www.mysite.com/blog

what I have installed so far

  • IIS 8 - url rewrite 2
  • Node.js v0.10.24
  • x64 Ghost 0.3.3 iisnode x64

I followed the instructions on this thread in the ghost forum

and when I try to browse it I get a 404 error. so far this is my web config:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.webServer>         
      <handlers>
           <add name="iisnode" path="index.js" verb="*" modules="iisnode" />
     </handlers>

      <iisnode
      nodeProcessCommandLine="&quot;%programfiles%\nodejs\node.exe&quot;" 
      interceptor="&quot;%programfiles%\iisnode\interceptor.js&quot;" />

      <rewrite>
           <rules>
                <rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
                     <match url="iisnode" />
                </rule>
                <rule name="DynamicContent">
                     <conditions>
                          <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True" />
                     </conditions>
                     <action type="Rewrite" url="index.js" />
                </rule>
           </rules>
      </rewrite>
   </system.webServer>
 </configuration>

and my production config

production: {
        url: 'http://www.mysite.com/blog',
        mail: {},
        database: {
            client: 'sqlite3',
            connection: {
                filename: path.join(__dirname, '/content/data/ghost.db')
            },
            debug: false
        },
        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
        }
    }

I'm new to node.js services and any help will be appreciated!

4
  • Did you already solve this?
    – sabotero
    Sep 17, 2014 at 8:32
  • Nope :/ ended up with wordpress Sep 17, 2014 at 12:32
  • oh what a pitty... I'm just finishing to put all in place in my own server (Windows Server 2012), I will made a post installing ghost from scratch and come back to you if you are interested !! In the meantime which server do you use?
    – sabotero
    Sep 17, 2014 at 14:52
  • a vm on azure, windows server 2012 as well Sep 17, 2014 at 15:34

1 Answer 1

0

I know this is a bit late, but got this same error when I tried to setup Ghost 1.7.*. What I did was change the rewrite rule as follows:

  <rewrite>
       <rules>
            <rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
                 <match url="iisnode" />
            </rule>
            <rule name="DynamicContent">
                 <conditions>
                      <add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True" />
                 </conditions>
                 <action type="Rewrite" url="/blog/index.js" />
            </rule>
       </rules>
  </rewrite>

I did a writeup of it here : http://huytn.com/setup-ghost-blog-version-1-for-iis/ The action url would have the url="/blog/index.js" eg.

<action type="Rewrite" url="/blog/index.js" />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .