.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Catalyst::Manual::Deployment::IIS::FastCGI 3pm" .TH Catalyst::Manual::Deployment::IIS::FastCGI 3pm "2013-09-16" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Manual::Deployment::IIS::FastCGI \- Deploying Catalyst with Microsoft IIS .SH "Microsoft IIS" .IX Header "Microsoft IIS" Probably the best way to deploy a Catalyst application on \s-1IIS\s0 is by using \&\s-1IIS\s0 as a front end proxy. However if you positively must use FastCGI (say due to internal \s-1IT\s0 policies) then this manual shows you how. .PP It is possible to run Catalyst under \s-1IIS\s0 with FastCGI, but only on \s-1IIS 6.0 \s0(Microsoft Windows 2003), \s-1IIS 7.0 \s0(Microsoft Windows 2008 and Vista), and (hopefully) its successors. .PP FastCGI is sometimes said to be supported on \s-1IIS 5.1 \s0(Windows \s-1XP\s0), but some features (specifically, wildcard mappings) are not supported. This prevents Catalyst applications from running on the server. .PP Let us assume that our server has the following layout: .PP .Vb 3 \& d:\eWWW\eWebApp\e path to our Catalyst application \& d:\estrawberry\eperl\ebin\eperl.exe path to perl interpreter (with Catalyst installed) \& c:\ewindows Windows directory .Ve .SS "Setup \s-1IIS 6.0 \s0(Windows 2003)" .IX Subsection "Setup IIS 6.0 (Windows 2003)" .IP "Install FastCGI extension for \s-1IIS 6.0\s0" 4 .IX Item "Install FastCGI extension for IIS 6.0" FastCGI is not a standard part of \s-1IIS 6 \-\s0 you have to install it separately. For more info and the download, go to . Choose the appropriate version (32\-bit/64\-bit); installation is quite simple (in fact no questions, no options). .IP "Create a new website" 4 .IX Item "Create a new website" Open \*(L"Control Panel\*(R" > \*(L"Administrative Tools\*(R" > \*(L"Internet Information Services Manager\*(R". Click \*(L"Action\*(R" > \*(L"New\*(R" > \*(L"Web Site\*(R". After you finish the installation wizard you need to go to the new website's properties. .IP "Set website properties" 4 .IX Item "Set website properties" On the tab \*(L"Web site\*(R", set proper values for: Site Description, \s-1IP\s0 Address, \s-1TCP\s0 Port, \s-1SSL\s0 Port, etc. .Sp On the tab \*(L"Home Directory\*(R" set the following: .Sp .Vb 3 \& Local path: "d:\eWWW\eWebApp\eroot" \& Local path permission flags: check only "Read" + "Log visits" \& Execute permitions: "Scripts only" .Ve .Sp Click \*(L"Configuration\*(R" button (still on Home Directory tab) then click \*(L"Insert\*(R" the wildcard application mapping, and in the next dialog set: .Sp .Vb 2 \& Executable: "c:\ewindows\esystem32\einetsrv\efcgiext.dll" \& Uncheck: "Verify that file exists" .Ve .Sp Close all dialogs with \*(L"\s-1OK\*(R".\s0 .IP "Edit fcgiext.ini" 4 .IX Item "Edit fcgiext.ini" Put the following lines into c:\ewindows\esystem32\einetsrv\efcgiext.ini (on 64\-bit system c:\ewindows\esyswow64\einetsrv\efcgiext.ini): .Sp .Vb 12 \& [Types] \& *:8=CatalystApp \& ;replace 8 with the identification number of the newly created website \& ;it is not so easy to get this number: \& ; \- you can use utility "c:\einetpub\eadminscripts\eadsutil.vbs" \& ; to list websites: "cscript adsutil.vbs ENUM /P /W3SVC" \& ; to get site name: "cscript adsutil.vbs GET /W3SVC//ServerComment" \& ; to get all details: "cscript adsutil.vbs GET /W3SVC/" \& ; \- or look where are the logs located: \& ; c:\eWINDOWS\eSYSTEM32\eLogfiles\eW3SVC7\ewhatever.log \& ; means that the corresponding number is "7" \& ;if you are running just one website using FastCGI you can use \*(Aq*=CatalystApp\*(Aq \& \& [CatalystApp] \& ExePath=d:\estrawberry\eperl\ebin\eperl.exe \& Arguments="d:\eWWW\eWebApp\escript\ewebapp_fastcgi.pl \-e" \& \& ;by setting this you can instruct IIS to serve Catalyst static files \& ;directly not via FastCGI (in case of any problems try 1) \& IgnoreExistingFiles=0 \& \& ;do not be fooled by Microsoft doc talking about "IgnoreExistingDirectories" \& ;that does not work and use "IgnoreDirectories" instead \& IgnoreDirectories=1 .Ve .SS "Setup \s-1IIS 7.0 \s0(Windows 2008 and Vista)" .IX Subsection "Setup IIS 7.0 (Windows 2008 and Vista)" Microsoft \s-1IIS 7.0\s0 has built-in support for FastCGI so you do not have to install any addons. .IP "Necessary steps during \s-1IIS7\s0 installation" 4 .IX Item "Necessary steps during IIS7 installation" During \s-1IIS7\s0 installation, after you have added role \*(L"Web Server (\s-1IIS\s0)\*(R" you need to check to install the role feature \*(L"\s-1CGI\*(R" \s0(do not be nervous that it is not FastCGI). If you already have \s-1IIS7\s0 installed you can add the \*(L"\s-1CGI\*(R"\s0 role feature through \*(L"Control panel\*(R" > \*(L"Programs and Features\*(R". .IP "Create a new website" 4 .IX Item "Create a new website" Open \*(L"Control Panel\*(R" > \*(L"Administrative Tools\*(R" > \*(L"Internet Information Services Manager\*(R" > \*(L"Add Web Site\*(R". .Sp .Vb 3 \& site name: "CatalystSite" \& content directory: "d:\eWWW\eWebApp\eroot" \& binding: set proper IP address, port etc. .Ve .IP "Configure FastCGI" 4 .IX Item "Configure FastCGI" You can configure FastCGI extension using commandline utility \&\*(L"c:\ewindows\esystem32\einetsrv\eappcmd.exe\*(R" .RS 4 .ie n .IP "Configuring section ""fastCgi"" (it is a global setting)" 4 .el .IP "Configuring section ``fastCgi'' (it is a global setting)" 4 .IX Item "Configuring section fastCgi (it is a global setting)" .Vb 1 \& appcmd.exe set config \-section:system.webServer/fastCgi /+"[fullPath=\*(Aqd:\estrawberry\eperl\ebin\eperl.exe\*(Aq,arguments=\*(Aqd:\ewww\eWebApp\escript\ewebapp_fastcgi.pl \-e\*(Aq,maxInstances=\*(Aq4\*(Aq,idleTimeout=\*(Aq300\*(Aq,activityTimeout=\*(Aq30\*(Aq,requestTimeout=\*(Aq90\*(Aq,instanceMaxRequests=\*(Aq1000\*(Aq,protocol=\*(AqNamedPipe\*(Aq,flushNamedPipe=\*(AqFalse\*(Aq]" /commit:apphost .Ve .IP "Configuring proper handler (it is a site related setting)" 4 .IX Item "Configuring proper handler (it is a site related setting)" .Vb 1 \& appcmd.exe set config "CatalystSite" \-section:system.webServer/handlers /+"[name=\*(AqCatalystFastCGI\*(Aq,path=\*(Aq*\*(Aq,verb=\*(AqGET,HEAD,POST\*(Aq,modules=\*(AqFastCgiModule\*(Aq,scriptProcessor=\*(Aqd:\estrawberry\eperl\ebin\eperl.exe|d:\ewww\eWebApp\escript\ewebapp_fastcgi.pl \-e\*(Aq,resourceType=\*(AqUnspecified\*(Aq,requireAccess=\*(AqScript\*(Aq]" /commit:apphost .Ve .Sp Note: before launching the commands above, do not forget to change the site name and paths to values relevant for your server setup. .RE .RS 4 .RE .PP \fISetup of your application\fR .IX Subsection "Setup of your application" .PP Note that you \fB\s-1MUST\s0\fR have the config setting \f(CW\*(C`use_request_uri_for_path\*(C'\fR set to true to work in \s-1IIS7 \-\s0 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. / .SH "AUTHORS" .IX Header "AUTHORS" Catalyst Contributors, see Catalyst.pm .SH "COPYRIGHT" .IX Header "COPYRIGHT" This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.