Reputation: 153
I have a Perl/Catalyst WebAapp running on Windows IIS with FastCGI. I am trying to move the application from Windows 2012R2/IIS8.5 to 2019/IIS10 Old: Windows 2012R2/IIS 8.5(Perl:5.20.2(x64)/Catalyst: 5.90091) New: Windows 2019/IIS 10(Perl:5.32(x64)/Catalyst: 5.90129)
Problem: what I am experiencing is that calls to uri_for seem to be using a relative path(based on current page) instead of the root path. e.g :[% c.uri_for('/static/css/vendor/bootstrap/3.3.5/bootstrap.min.css') %] upon login points to: http://testapp.net/login/static/css/vendor/bootstrap/3.3.5/bootstrap.min.css instead of http://testapp.net/static/css/vendor/bootstrap/3.3.5/bootstrap.min.css
I have root ($c->config->{root}) set to my Catalysts root folder (c:\inetpb\MyApp\root) This has worked fine for 6 years on my 2012R2 box. Any ideas on how to resolve this on IIs10?.
PS: I did copy over the existing Perl install from the old server and it still does the same thing which rules out Perl/Catalyst version.
Upvotes: 2
Views: 101
Reputation: 153
After some investigation into this (thanks to ikegami and hobbs suggestions)
I found out that the Plack::Middleware::IIS6ScriptNameFix used to fix the variables PATH_INFO and SCRIPT_NAME being passed by the webserver's FastCGI was not running in IIS 10.
The logic in the fix only covers IIS 6.0 through 8.5 and will not run on IIS10. After updating the code in this module to work with IIS 10 the issue was resolved.
I did open an issue on this module and it was resolved by the Author MIYAGAWA.
He has released an update to the Plack module and included a force option to enable the middleware fix to run on any IIS version.
In summary, to resolve this:
Upvotes: 1