Redmine on IIS walkthrough

Added by Marek Kreft almost 10 years ago

Hello.

As I see some movement on the Windows users side I would like to give it some more impact by this short How To. Be warned that I’ve encountered problem that can be critical to some of you. I’ve writhed about it at the end of this article, but I’m also counting that someone will know the solution to that which will make this walkthrough completed and worthy for all.

The environment will be in this case Windows Server 2003 and IIS v 6.0.

First of all check do you have 'Web site' folder in Your IIS ( Administrative tools -> Internet Information Services). If Yes you can skip the short section below.

If NO (make sure that you have cd with Service Pack 2 for Microsoft Server 2003 as you will needed):
Go to Controll Panel -> Administrative tools -> Manage Your Server choose 'Add or remove a role' and (after clicking 'next') add 'Application Server' feature.
Choose your additional features as you please and go forward to the installation screen. Proceed with installation till its over.

Go to your Redmine folder r-click on it and make sure that permissions are set correctly for outside users to have access to it.
Next we will install RubyForIIS-0.1.exe (for example form http://ruslany.net/download/RubyForIIS-0.1.exe)
The RubyForIIS.exe package contains the FastCGI client library on which RoR is dependent in order to use its dispatch.fcgi script. Just point the ruby directory and the rest will do installer.

After that we have to load one more thing which is fcgisetup32.msi
(Beware that IIS will be stopped during the installation of FastCGI)
Prepare your RedmineRoot\public folder like this:

And the rest of the properties set like underneath.


Make sure that the permissions of web folder, as well as web permissions are set correctly.

Lastly you need to create your own fcgiext.ini which should be in C:\WINDOWS\system32\inetsrv

One can look like this:

[Types]
 *:758848565=RUBY
 fcgi:758848565=RUBY

[RUBY]
 ExePath=C:\Ruby\bin\ruby.exe
 Arguments=C:\redmine\public\dispatch.fcgi
 IgnoreDirectories=0
 IgnoreExistingFiles=1
 QueueLength=1000
 MaxInstances=4
 InstanceMaxRequests=200

(You can add this on the end of the file) Where 758848565 is the number of your site.

Your Redmine should be ready now for usage.

One thing I couldn’t get through is that IIS was unable to set the starting page correctly. I needed to give him the localhost/login address for the start location. This was annoying, and made difficult to use Redmine properly. If anyone would be able to bypass that, please give a shout.

1.jpg (57.1 KB)

2.jpg (83.2 KB)

3.jpg (13.4 KB)

4.jpg (47.4 KB)

Replies (3)

RE: Redmine on IIS walkthrough - Added by Marek Kreft almost 10 years ago

Sorry for the lack of pictures. My mistake.

Go to your Redmine folder r-click on it and make sure that permissions are set correctly for outside users to have access to it.
Next we will install RubyForIIS-0.1.exe (for example form http://ruslany.net/download/RubyForIIS-0.1.exe)
The RubyForIIS.exe package contains the FastCGI client library on which RoR is dependent in order to use its dispatch.fcgi script. Just point the ruby directory and the rest will do installer.

After that we have to load one more thing which is fcgisetup32.msi
(Beware that IIS will be stopped during the installation of FastCGI)
Prepare your RedmineRoot\public folder like this:

And the rest of the properties set like underneath.


Make sure that the permissions of web folder, as well as web permissions are set correctly.

Lastly you need to create your own fcgiext.ini which should be in C:\WINDOWS\system32\inetsrv

One can look like this:

[Types]
*:758848565=RUBY
fcgi:758848565=RUBY

[RUBY]
ExePath=C:\Ruby\bin\ruby.exe
Arguments=C:\redmine\public\dispatch.fcgi
IgnoreDirectories=0
IgnoreExistingFiles=1
QueueLength=1000
MaxInstances=4
InstanceMaxRequests=200

(You can add this on the end of the file) Where 758848565 is the number of your site.

Your Redmine should be ready now for usage.

One thing I couldn’t get through is that IIS was unable to set the starting page correctly. I needed to give him the localhost/login address for the start location. This was annoying, and made difficult to use Redmine properly. If anyone would be able to bypass that, please give a shout.

1.jpg (57.1 KB)

2.jpg (83.2 KB)

3.jpg (13.4 KB)

4.jpg (47.4 KB)

RE: Redmine on IIS walkthrough - Added by Arnaud Lesauvage almost 10 years ago

Hi all

Thank you for this walkthrough Marek, I was missing the "RubyForIIS-0.1.exe" part ! Very important !

Marek Kreft wrote:

One thing I couldn’t get through is that IIS was unable to set the starting page correctly. I needed to give him the localhost/login address for the start location. This was annoying, and made difficult to use Redmine properly. If anyone would be able to bypass that, please give a shout.

I have a fix for that. You need to use Ionics Isapi Rewrite Filter for that. I guess that any URL rewriting tool would do the trick, but this one is free, open source, and working !
I just extracted the file IsapiRewrite4.dll to C:\WINDOWS\system32\inetsrv\URL_Rewriter (it is recommended that you install the DLL in a subfolder of inetsrv, not in inetsrv itself, because of some obscur problems with metabase backup).

I then created a simple IsapiRewrite4.ini in this same folder with just one rule :

IterationLimit 30
RewriteRule ^/$ /projects
Next, add the URL rewriting filter to your site's ISAP filters :
  • in the properties of the web site, got to the "ISAP Filters" tab
  • click "Add..."
  • in "Filter name" give a name to your filter (something like "URL Rewriter" maybe, or "Root document fix")
  • in "Executable" enter the full path to the IsapiRewrite4.dll (i.e. C:\WINDOWS\system32\inetsrv\URL_Rewriter\IsapiRewrite4.dll)
  • restart your web server

Everything should run smoothly now : the only URL matching your URL rewriting rule will be the root document (i.e. URL of your web site + trailing slash), and it will rewrite this final "/" to "/projects" before passing it to fastcgi.

PS : note that for some unkown reason, RubyForIIS installed its files in C:\Ruby\RubyForIIS, not in C:\Ruby. I moved them all to C:\Ruby manually, I don't know if that was needed or not, but it works !

(1-3/3)