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!

HBruijn
  • 72,524
  • 21
  • 127
  • 192
pedrommuller
  • 279
  • 5
  • 13

1 Answers1

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" />
skub
  • 97
  • 2