Installing Railo Server on IIS7 64bit

Here are the steps to install Railo on IIS7 with Resin.

1.Install Microsoft Windows Server 2008 Standard x64 Edition

2.Install IIS7 with the "Role-Service" with ISAPI Extensions and ISAPI Filters

3.Download RESIN 3.2.1 and unpack it to a directory. (I renamed the directory to resin and copied it to /)

4.Copy the /resin/win64/resin_os.dll to /resin. (If you don't do this, they will not be loaded)

5.Download and install JAVA 1.6 SDK 64-bit.

6.Set the environment variables for RESIN_HOME and JAVA_HOME (Right click on computer, properties, advanced system settings, environment variables. Create a new System variable called RESIN_HOME and point it to c:/resin and a new System variable called JAVA_HOME and point it to /Program Files/Java/jre6 (or wherever you installed JAVA). (I rebooted here)

7.Copy /resin/win64/isapi_srun.dll to /inetpub/scripts.

8.Go to IIS Manager and create a virtual directory called /scripts under default web site. It should point to /inetpub/scripts.

9.Configure IIS7 (a)[ISAPI FILTER] – add an ISAPI filter and called it "RESIN" and point it to c:\inetpub\scripts\isapi_srun.dll. (b)[ISAPI AND CGI Restrictions] – add "RESIN" to ISAPI and CGI Restrictions with path c:\inetpub\scripts\isapi_srun.dll and check "Allow extension path to execute". (c)[MIME Types] – add ".jsp", ".cfm", and ".cfc" with type text/html. (d)[Handler Mappings] – add a script map for path "*.jsp", and "*.cf*", executable c:\inetpub\scripts\isapi_srun.dll, name it jsp = "RESIN" and cf* = "RAILO" (You want to allow ISAPI Extension) (Make sure you change the permissions to execute) (e)[Default Documents] - add "index.cfm" and "index.jsp"

10.Configure RESIN (Resin needs to point to the wwwroot or there where the webroot lies elsewise you receive 404's)

11.Include Railo (http://www.railo-technologies.com/en/index.cfm?treeID=215)

12.Restart IIS and RESIN 13.Install as Windows Service Right click on command prompt and "Run as Administrator" C:\> resin\resin.exe -install -conf conf/resin.xml -user UsernametoRunResin -password PasswordofUser Next I hope to have instructions with Jboss instead of Resin. Or if anyone already has, please let me know.

Comments

Andrea

Andrea wrote on 02/13/09 7:33 AM

Hi,

I am trying to use Railo with iis on vista ( 32 bit ).
I downloaded and installed the .exe with resin included.
Followed all your post but when I try to call an index.cfm :

Modulo   IIS Web Core
Notifica   MapRequestHandler
Gestore   StaticFile
Codice errore   0x80070002
URL richiesto   http://railo:80/scripts/isapi_srun.dll/
Percorso fisico   C:\inetpub\scripts\isapi_srun.dll\
Metodo di accesso   Anonima
Utente accesso   Anonima

IIS gets crazy.....

Any suggestion??

Thanks

Andrea
Andrea

Andrea wrote on 02/13/09 7:37 AM

I know is crazy .....but I get the same error also when trying to call an .htm......
Modulo   IIS Web Core
Notifica   MapRequestHandler
Gestore   StaticFile
Codice errore   0x80070002
URL richiesto   http://railo:80/scripts/isapi_srun.dll/index.htm
Percorso fisico   C:\inetpub\scripts\isapi_srun.dll\index.htm
Metodo di accesso   Anonima
Utente accesso   Anonima

railo is the host header that I mapped inhost files to 127.0.0.1....

Thanks for help

Andrea
Chris

Chris wrote on 02/13/09 10:06 AM

I haven't installed it on Vista or a 32bit box yet. (Plan on trying on Windows 2008 32 bit next week). You shouldn't have to do step 3, and make sure you aren't installing the 64 bit JAVA. Do you have a URL?
Andrea

Andrea wrote on 02/13/09 11:00 AM

HI,

sorry no url is on localhost.
Btw thanks for answering

Andrea
Timothy Farrar

Timothy Farrar wrote on 02/26/09 1:05 PM

I am trying to install Railo on Windows 7 64 bit.

I have IIS running, Resin is installed, and Railo is installed.
If I hit localhost:8600 railo runs the code, but if I hit localhost/index.cfm, or just localhost I get #now()#.
I don't quite understand how to get Railo to run this code. Perhaps I missed or missunderstood something in your example... I was wondering if there was something more to step 11 than just making sure that I have RAILO installed on my machine?
Mike

Mike wrote on 03/22/09 8:50 PM

Can you elaborate a bit more on step 10 please. The Railo admin & docs all work but I can't seem to get it to work on my CFM pages? This is what I have in my /railo/conf/resin.conf" file:

<!-- configures the default host, matching any host name -->
<host id="">
<web-app id="/">
<document-directory>C:/inetpub/wwwroot</document-directory>
</web-app>

<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
<prologue>
<resin:set var="resin_admin_password" value=""/>
<resin:set var="resin_admin_localhost" value="true"/>
</prologue>
</web-app>
</host>

<host id="foo.com" root-directory="C:/inetpub/wwwroot">
<host-alias>foo.com</host-alias>
<host-alias>www.foo.com</host-alias>
<web-app id="/" root-directory="foo.com"/>
</host>

I've also added this domain in my host file as well. Every time I try to call:

http://foo.com/test.cfm

Which is a test script that prints the numbers 1 to 10 on the screen I get the following error:

FireFox Error:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.

But if run the script from this URL:

http://foo.com:8600/test.cfm

Everything works fine. Am I doing something wrong in my setup? Any help would be appreciated.

Thank you,

Mike
Mike

Mike wrote on 03/22/09 8:53 PM

I forgot to mention I'm running this on Vista 32bit with IIS7.
Chris

Chris wrote on 03/23/09 10:50 AM

I haven't tested on Vista yet, but I believe you want something like this:

<host id="foo.com"> <root-directory>c:/inetpub/wwwroot</root-directory> <web-app id="/" document-directory="c:/inetpub/www.root/foo.com"/> </host>

You may also want to check out this:
<a href="http://www.railo.ch/blog/index.cfm/2009/2/16/Railo-Installation-guides">http://www.railo.ch/blog/index.cfm/2009/2/16/Railo-Installation-guides</a>
Mike

Mike wrote on 03/23/09 11:21 AM

Hi Chris,

Thank you for your response. Should I change the "default configuration" section to what I have posted in the resin.conf file or should I leave that as the defaults?

Thank you,

Mike
Chris

Chris wrote on 03/23/09 11:22 AM

I believe I left it, but I can't remember. I have since switched to Tomcat instead of RESIN because the RESIN ISAPI Filter was conflicting with another one of my filters.
Mike

Mike wrote on 03/23/09 12:14 PM

Hi Chris,

Just tried it with your suggestion for the host settings but still the same issue. CFM just does not run on port 80 only 8600. I also had a look at the link you posted and I've already visited those pages and the only IIS7 how to points to this page. I'm not sure what else I can try at this point. I've been looking into this for 4 days now and can't figure out how to get around this issue. Maybe I'll try it on my Win 2008 64bit server to see if it will work.

Another thing I wanted to ask is, would you recommend running the community version of Railo on a live production server to serve client CFM web sites? I have a few clients who's websites are developed in ColdFusion and would like to bring them in house and I wanted to know if there would be any issues that you might know of.

Thank you,

Mike
Chris

Chris wrote on 03/23/09 12:18 PM

I run the community version on my blog and it works great. Railo 3.1 is suppose to come out soon so You may want to wait.

You could also post to the Railo group on google. Also, check out the log files and see if you see anything in there.
Mike

Mike wrote on 03/25/09 9:12 PM

Has anyone been able to successfully install Railo as shown here on their system? If so, please share the steps you took to get it to work. I've tried everything and it's not working on my Vista 32 and Win 2008 32.

Thank you,

Mike
Chris

Chris wrote on 03/26/09 10:07 AM

Mike,

If you want me to take a look at your server, send me a message. Not sure if I will be able to solve it, but who knows!
Chris

Chris wrote on 03/26/09 10:14 PM

Acrobat.com, unless you can think of something else.
Mike

Mike wrote on 03/30/09 1:12 AM

Hi Everyone,

After many tests & sleepless nights I can assure you that Railo 3.x + Resin 3.x will not work on IIS7 32bit. The reason for this is I was able to finally install it and have it running on IIS7 64bit. I've documented all my steps to get it to work on IIS7 64bit and I've tried the exact same steps on IIS7 32bit and it's just not working. There must be something wrong with the "win32/isapi_srun.dll" that it's not compatible with IIS7 32bit. I'm aware that people are able to run Railo + Resin on IIS6 32bit but I think this is where the issue is. This DLL hasn't been rewritten for the IIS7 32bit environment and that's what's causing the problem. I followed the instructions on this page to install on IIS7 64bit but found some issues. I will highlight the steps that I changed to get it to work on my server.

5) You should download "jdk-6u14-ea-bin-b03-windows-i586-10_mar_2009.exe"

7) I didn't copy "/resin/win64/isapi_srun.dll" to "c:\inetpub\scripts" folder. I simply pointed all "ISAPI Filters", "ISAPI and CGI Restrictions", and "Handler Mappings" to "c:\resin\win64\isapi_srun.dll" and all works fine for me. Just make sure you point your virtual script directory to the same location "/resin/win64/isapi_srun.dll".

10) You will need to change the following in "c:/resin/conf/resin.xml":

<!-- configures the default host, matching any host name -->
<host id="" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id="/" root-directory="webapps/ROOT"/>
<web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
<!--
- Administration application /resin-admin
-->
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
<!--
<web-app id="/resin-config" root-directory="${resin.root}/doc/config"/>
-->
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
</host>

Change it to:

<!-- configures the default host, matching any host name -->
<host id="" root-directory="c:/inetpub/wwwroot">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<!--web-app id="/" root-directory="webapps/ROOT"/-->
<web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
<!--
- Administration application /resin-admin
-->
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
<!--
<web-app id="/resin-config" root-directory="${resin.root}/doc/config"/>
-->
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
</host>

Note, I'm using the "inetpub\wwwroot" folder. But you should use your own folder as you like. Then you'll need to define your web sites right after the closing "</host>" as follows:

<host id="foo.com">
   <root-directory>C:/inetpub/wwwroot/foo.com</root-directory>
   <host-alias>foo.com</host-alias>
   <host-alias>www.foo.com</host-alias>
   <web-app id="/" document-directory="."></web-app>
</host>

You will need to add one of these host nodes for each web site you add that will need resin/railo to function.

11) You will need to add the code from here:
http://www.railo-technologies.com/en/index.cfm?treeID=215

Add this code to "/resin/conf/app-default.xml" any where before the "</web-app-default></cluster>" which is at the end of the file.


That's all I had to change & figure out to get it to work for me. I hope that clears some of the steps for others who were trying to figure things out. I hope the Railo developers give us better documentation when the new version of Railo is released on Mar-31-2009.

Thank you,

Mike
Chris

Chris wrote on 03/30/09 10:46 AM

Thanks Mike for posting this. I didn't really care for RESIN. Tomcat was much easier, except I can't get the the default document (index.cfm, default.cfm, etc) to work with Tomcat and IIS. It works fine if I do http://localhost/index.cfm, but not http://localhost/. I agree, I hope there are more howtos for IIS. There are a ton on Apache.
Mike

Mike wrote on 03/30/09 11:48 AM

Hi Chris,

I assume you are using IIS7 with Tomcat. I'm not very familiar with Tomcat but from what you describe you should check the following in IIS7:

- Default Document
- MIME Types
- Mapping Handlers

You should check this at the global and website level. Some times IIS7 doesn't apply the global changes to the websites that are already defined and you'll have to apply them manually. This has happened to me a few times. If that doesn't help then check the railo "railo/conf/app-default.xml" file for the following:

<!-- Configures the special index files to check for directory URLs -->
<welcome-file-list>
<welcome-file>index.cfm</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.php</welcome-file>
</welcome-file-list>

Make sure you define what ever the default files are here. If that doesn't work then it might be something you need to add in Tomcat which I'm not familiar with. I hope that helps.

Thank you,

Mike
Chris

Chris wrote on 03/30/09 11:56 AM

Mike,

I do have the Default Document setup in IIS and the welcome-files in tomcat. However, I tried adding mime types but then it just shows a blank page, and I have no clue what file to point to for the handler mappings. That's were I am stuck. Like you said, I hope Railo 3.1 shows how to do stuff like this.
Mike

Mike wrote on 03/30/09 2:50 PM

Hi Chris,

I did a quick search on google and found some info here:

http://forums.iis.net/t/1138519.aspx?PageIndex=2

Try doing the following:

In your IIS Manager's top most level node (machine level), review your ISAPI & CGI Restrictions settings. I assume that those settings are available, if they are not, then you need to install that role service in your web servers roles in your Server Manager (this is straightforward enough). When you double click the restrictions settings do you see an entry such as:

jakarta Allowed <path_to_the_isapi_redirect.dll>

I'm guessing you are missing this piece as the old redirector doesn't add this configuration to IIS7 (as it wasn't part of IIS6 configuration and therefore doesn't get mapped accordingly) if I remember correctly. Also, jakarta is a default value set inside the install_isapi.vbs script, if you changed that value you will want to ensure jakarta is changed to match whatever you used.

If that setting is there check your website level tree node where you installed the jakarta application (either "Default Web site" or whatever you chose when running the script). Review the Isapi Filters and ensure you see an entry similar to:

jakarta <path_to_the_isapi_redirect.dll> Local (or Inherited, but preferrably local)

I'm going to assume this exists (install_isapi.vbs should add this) but thought I'd check.

Underneath your "Web Site" ensure that the "jakarta" (or whatever if you changed it) application exists. Review the Handler Mappings settings and look for a setting similar to the following:

ISAPI-dll *.dll Enabled File IsapiModule Local (or Inherited)

It is quite possible that this is disabled. The install_isapi.vbs script seems to disable this sometimes if run multiple times for whatever reason. If it is, enable it. You might also want to ensure that this setting has script and execute permissions.

Lastly, ensure that you did not make a typo to any path when running the install_isapi.vbs script (yes, it does happen). You can review the registry settings that the script writes to check this. Run your regedit, and go to HKEY_LOCAL_MACHINE -> Software -> Apache Software Foundation -> Jakarta Isapi Redirector -> 1.0. Ensure the paths to the worker_file and worker_mount_file is correct.

If you change anything given the above information, restart IIS/Tomcat and retest.

I hope that helps you in getting your default document fixed.

Thank you,

Mike
Chris

Chris wrote on 03/30/09 5:32 PM

Thanks Mike for checking it out. I reviewed it once again and everything looks ok. Not sure why it doesn't like the default documents. Thanks again tho.
Matt

Matt wrote on 11/01/09 2:13 PM

Point 11 - How do you "include" railo ?
Point 12 - doesnt work for me - says resin.exe doesnt exist

I'm finding this so difficult to understand, think, quite possibly i'm too thick, if anyone can help me install this on my server i would be greatful
Matt

Matt wrote on 11/01/09 2:17 PM

I also get just get HTML returned and can see all my coldfusion code so if anyone knows why that might be, this is since i added a mime type for .cfm as text/html
Matt

Matt wrote on 11/01/09 2:21 PM

If i remove the mime type i get this:

The requested content appears to be script and will not be served by the static file handler.

which i dont understand because i have a handler specified for *.cf*

Leave a comment

Tell us about yourself
(required field)
(required field)
Comment and preferences
Leave this field empty: