Catalyst::Manual::Deployment::IIS::FastCGI - Deploying Catalyst with Microsoft IIS
-=head2 Microsoft IIS
+=head1 Microsoft IIS
-It is possible to run Catalyst under IIS with FastCGI, but only on IIS 6.0
-(Microsoft Windows 2003), IIS 7.0 (Microsoft Windows 2008 and Vista) and
-hopefully its successors.
+Probably the best way to deploy a Catalyst application on IIS is by using
+IIS as a front end proxy. However if you positively must use FastCGI (say
+due to internal IT policies) then this manual shows you how.
-Even if it is declared that FastCGI is supported on IIS 5.1 (Windows XP) it
-does not support some features (specifically: wildcard mappings) that prevents
-running Catalyst application.
+It is possible to run Catalyst under IIS with FastCGI, but only on IIS
+6.0 (Microsoft Windows 2003), IIS 7.0 (Microsoft Windows 2008 and
+Vista), and (hopefully) its successors.
+
+FastCGI is sometimes said to be supported on IIS 5.1 (Windows XP), but
+some features (specifically, wildcard mappings) are not supported. This
+prevents Catalyst applications from running on the server.
Let us assume that our server has the following layout:
d:\strawberry\perl\bin\perl.exe path to perl interpreter (with Catalyst installed)
c:\windows Windows directory
-=head3 Setup IIS 6.0 (Windows 2003)
+=head2 Setup IIS 6.0 (Windows 2003)
-=over 4
+=over
=item Install FastCGI extension for IIS 6.0
-FastCGI is not a standard part of IIS 6 - you have to install it separately. For
-more info and download go to L<http://www.iis.net/extensions/FastCGI>. Choose
-approptiate version (32-bit/64-bit), installation is quite simple
-(in fact no questions, no options).
+FastCGI is not a standard part of IIS 6 - you have to install it
+separately. For more info and the download, go to
+L<https://www.iis.net/downloads/microsoft/fastcgi-for-iis>. Choose the appropriate version
+(32-bit/64-bit); installation is quite simple (in fact no questions, no
+options).
=item Create a new website
=item Set website properties
-On tab "Web site" set proper values for:
-Site Description, IP Address, TCP Port, SSL Port etc.
+On the tab "Web site", set proper values for: Site Description, IP
+Address, TCP Port, SSL Port, etc.
-On tab "Home Directory" set the following:
+On the tab "Home Directory" set the following:
Local path: "d:\WWW\WebApp\root"
Local path permission flags: check only "Read" + "Log visits"
Execute permitions: "Scripts only"
Click "Configuration" button (still on Home Directory tab) then click "Insert"
-the wildcard application mapping and in the next dialog set:
+the wildcard application mapping, and in the next dialog set:
Executable: "c:\windows\system32\inetsrv\fcgiext.dll"
Uncheck: "Verify that file exists"
=back
-=head3 Setup IIS 7.0 (Windows 2008 and Vista)
+=head2 Setup IIS 7.0 (Windows 2008 and Vista)
-Microsoft IIS 7.0 has built-in support for FastCGI so you do not have to install
-any addons.
+Microsoft IIS 7.0 has built-in support for FastCGI so you do not have to
+install any addons.
-=over 4
+=over
=item Necessary steps during IIS7 installation
-During IIS7 installation after you have added role "Web Server (IIS)"
-you need to check to install role feature "CGI" (do not be nervous that it is
-not FastCGI). If you already have IIS7 installed you can add "CGI" role feature
-through "Control panel" > "Programs and Features".
+During IIS7 installation, after you have added role "Web Server (IIS)"
+you need to check to install the role feature "CGI" (do not be nervous
+that it is not FastCGI). If you already have IIS7 installed you can add
+the "CGI" role feature through "Control panel" > "Programs and
+Features".
=item Create a new website
-Open "Control Panel" > "Administrative Tools" > "Internet Information Services Manager"
-> "Add Web Site".
+Open "Control Panel" > "Administrative Tools" > "Internet Information Services
+Manager" > "Add Web Site".
site name: "CatalystSite"
content directory: "d:\WWW\WebApp\root"
You can configure FastCGI extension using commandline utility
"c:\windows\system32\inetsrv\appcmd.exe"
-=over 4
+=over
=item Configuring section "fastCgi" (it is a global setting)
appcmd.exe set config "CatalystSite" -section:system.webServer/handlers /+"[name='CatalystFastCGI',path='*',verb='GET,HEAD,POST',modules='FastCgiModule',scriptProcessor='d:\strawberry\perl\bin\perl.exe|d:\www\WebApp\script\webapp_fastcgi.pl -e',resourceType='Unspecified',requireAccess='Script']" /commit:apphost
-Note: before launching the commands above do not forget to change site
-name and paths to values relevant for your server setup.
+Note: before launching the commands above, do not forget to change the
+site name and paths to values relevant for your server setup.
=back
=back
+=head3 Setup of your application
+
+Note that you B<MUST> have the config setting C<use_request_uri_for_path> set to true
+to work in IIS7 - if you do not have this then all sub paths in your application
+(e.g. /foo/bar) will resolve to the root path, i.e. /
+
=head1 AUTHORS
Catalyst Contributors, see Catalyst.pm