iisnode and PHP running in same site
It possible to allow .js and .php files to run in same web site on iisnode?
have tried this in web.config app.js works but php does not if I remove the root web.config PHP works as is configured in iis7. Perhaps there is an example config / recommendation
web.config configuration extract:
<handlers>
<add name="FastCgiModule2" path="*.php" verb="*.php" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="Unspecified" />
<add name="iisnode" path="app.js" verb="*.js" modules="iisnode" />
</handlers>
<rewrite>
<rules>
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="iisnode" />
</rule>
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^app.js\/debug[\/]?" />
</rule>
<rule name="StaticContent">
<action type="Rewrite" url="public{{REQUEST_URI}}" />
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{{REQUEST_FILENAME}}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="app.js" />
</rule>
</rules>
</rewrite>
verb attribute is supposed to be GET, HEAD, POST etc.. like in the following config:
<add name="PHP54_via_FastCGI_Custom" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.4\php-cgi.exe" resourceType="Either" />
Also, make sure your applicationHost.config defines fastcgi settings :
<fastCgi> <application fullPath="C:\Program Files (x86)\PHP\v5.4\php-cgi.exe" activityTimeout="600" requestTimeout="600" instanceMaxRequests="10000" maxInstances="0"> <environmentVariables> <environmentVariable name="PHPRC" value="path to your php.ini file" /> </environmentVariables> </application> </fastCgi>
The fastcgi -> application-> fullPath attribute should match the handler->scriptProcessor attribute exactly.
thanks for response will give it a try
awesome thanks .. I had to disable the URL re-write inherited lines is IIS manager and got it working.
