Welcome to MSDN Blogs
Sign in
|
Join
|
Help
Kanwaljeet Singla's Weblog
This Blog
About
Email
Syndication
RSS 2.0
Atom 1.0
Search
Tags
AdvancedLogging
Appcmd
Configuration
Custom Errors
FastCGI
IIS 7.5
IIS7
MSDeploy
PHP
Tracing
WinCache
Recent Posts
Feature additions and bug fixes coming up in WinCache
Migrating FastCGI configuration from IIS 5.1/6.0 to IIS 7.0/7.5
How WinCache make PHP run faster
FastCGI ISAPI 1.5 Beta for WinXP and Win2K3
Using advanced logging to log custom module data
Archives
October 2009 (1)
September 2009 (2)
April 2009 (3)
March 2009 (1)
February 2009 (1)
January 2009 (2)
December 2008 (2)
June 2008 (3)
February 2008 (2)
December 2007 (2)
July 2007 (2)
June 2007 (1)
May 2007 (2)
April 2007 (1)
February 2007 (2)
December 2006 (2)
November 2006 (2)
August 2006 (3)
June 2006 (3)
Migrating FastCGI configuration from IIS 5.1/6.0 to IIS 7.0/7.5
Problem
As you know FastCGI functionality on IIS 5.1 and IIS 6.0 is provided by
FastCGI ISAPI
extension which is available as an independent download. On IIS 7.0 and beyond, FastCGI functionality is provided by IIS
FastCGI module
which comes with the operating system. These components use different configuration stores to store the settings that affect their behavior. FastCGI ISAPI uses an INI file named fcgiext.ini as its configuration store whereas FastCGI module keeps configuration in applicationHost.config in xml format with rest of IIS configuration. Before, migrating from IIS6 to IIS7 involved migrating fcgiext.ini configuration to FastCGI module manually as there was no automated way to do that. MSDeploy only had functionality to migrate metabase configuration but because FastCGI ISAPI configuration is kept separately in an INI file, that wasn’t possible.
Solution
MSDeploy v1 RTW
which is released today include a new provider named fcgiextConfig to automate task of migrating FastCGI ISAPI INI configuration to FastCGI module section. FcgiextConfig provider accepts a path which can be “APPHOST” or ”INI”. When path “APPHOST” is specified, configuration from
system.webServer/fastCgi
section in applicationHost.config is read. Path “APPHOST” should only be used on systems running FastCGI module (i.e. IIS7 and beyond). When path “INI” is specified, this provider reads the configuration from file “%windir%\system32\inetsrv\fcgiext.ini” and produce xml which looks like FastCGI module configuration. Once INI settings are mapped to produce the xml, msdeploy engine can compare configuration of FastCGI ISAPI with FastCGI module and make changes to FastCGI module configuration as required. Again, path “INI” can only be used on a machine which is running FastCGI ISAPI.
Examples
Dump command to dump INI settings looks like following.
msdeploy –verb:dump –source:fcgiExtConfig=ini –xml
msdeploy –verb:dump –source:fcgiExtConfig=apphost –xml
Sync command to move INI settings to FastCGI module section is following.
msdeploy –verb:sync –source:fcgiExtConfig=ini –dest:fcgiExtConfig=apphost -whatif
Details
Here is how INI settings are mapped to system.webServer/fastCgi settings. For each entry “<extension>:<optionalsiteid>=<sectionname>” under
[Types]
section of fcgiext.ini, we read the settings under section [<sectionname>]. If optional site id is present, we look for an entry for the same extension but without site id. If an entry is found, we use configuration under this entry as base set of settings for the site specific entry. So if “php=basephp” and “php:1=site1” entries are present in INI, settings under section [basephp] provide base values and then settings under section [site1] override base settings to generate configuration for “php:1” process pool. If a property is not present in the INI file, we assume the default value as assumed by FastCGI ISAPI extension. A FastCGI process pool entry is created for each INI entry with a valid ExePath. Various INI file settings are mapped to a FastCGI process pool as below.
fcgiext.ini configuration setting
system.webServer/fastCgi/application property
ExePath
fullPath
Arguments
arguments
QueueLength
queueLength
MaxInstances
maxInstances
IdleTimeout
idleTimeout
ActivityTimeout
activityTimeout
RequestTimeout
requestTimeout
InstanceMaxRequests
instanceMaxRequests
FlushNamedPipe
flushNamedPipe
Protocol
protocol
RapidFailsPerMinute
rapidFailsPerMinute
EnvironmentVars
environmentVariables
ResponseBufferLimit
Ignored
IgnoreExistingFiles
Ignored
IgnoreDirectories
Ignored
UnhealthyOnQueueFull
Ignored
If the source version is FastCGI ISAPI 1.5, some additional properties get picked and mapped as below.
StderrMode
stderrMode
MonitorChangesTo
MonitorChangesTo
SignalBeforeTerminateSeconds
signalBeforeTerminateSeconds
If FastCGI ISAPI version on source and FastCGI module version on destination are not compatible, fcgiextConfig provider will block the migration. Note that fcgiextConfig provider doesn’t take care of migrating the relevant IIS ScriptMaps. You can migrate ScriptMaps using a separate msdeploy migrate operation.
Hope this helps.
Kanwal
Published Friday, September 25, 2009 2:45 AM by
kjsingla
Filed under:
PHP
,
FastCGI
,
MSDeploy
Comments
No Comments
Anonymous comments are disabled