Configuring IIS6 with Railo

Many times we have installed Railo on IIS. Here's a guideline on how to install Railo on Win2K3 with IIS6. You can also watch the video on how to install Railo and IIS6.

The Video is found at the bottom of this page. It has been converted with the new tag <cfvideo> and is displayed with the new tag <cfvideoplayer>.

  1. Download Railo and execute the setup executable file

  2. Check if Railo runs correctly by calling http://localhost:8600/index.cfm you should see the following:


  3. If Railo runs correctly IIS has to be configured. Go to Step 4.
    If Railo does not start, or you don't see the above screen, please try the following:
    • Check whether the service Railo 2.0 runs
    • If the service runs, please check whether the firewall is blocking the server to run
    • If the service does not run, please execute the following command in the {railo installation directory}

      C:\Program Files\Railo>
      httpd.exe -Xms512M -Xmx512M -conf conf/resin.conf -java_home jre -java_exe jre\bin\java
      Then the reason for Railo failing to start should be displayed
    • If Railo still does not run function properly, it is time to write an email to railo railo_talk@yahoogroups.com


  4. IIS and Resin need to mirror their configuration. So every host entry in the IIS (website) needs to reflect in the resin.conf found in the directory C:\Program Files\Railo\conf You might need to enter following lines inside the tag of the file:

    <host id="myweb.com"> <root-directory>d:/webroots/myweb.com</root-directory> <web-app id="/" document-directory="d:/webroots/myweb.com"/> </host>

    or to make it much more comfortable:

    <host regexp="(.+)">
    <host-name>${host.regexp[1]}</host-name>
    <root-directory>d:/webroots/${host.regexp[1]}</root-directory>
    <web-app id="/" document-directory="d:/webroots/${host.regexp[1]}"/>
    </host>

    In the second case resin determines with the help of a regular expression where to locate a certain webroot. So you only need to create a directory named d:\webroots\hostname and the setting is valid without having to restart the application server service. But I wouldn't recommend this kind of definition, because it can grant access to webroots without manually allowing it.

  5. Set up a new website according to your needs by using the according wizard.

  6. If not already existent, create a folder named scripts inside a common directory (eg. D:\webroots\).

  7. Copy the file C:\Program Files\Railo\Wind32\isapi_srun.dll into the created directory

  8. Inside the IIS management console navigate to the Web Service Extensions


  9. Click on Add new Web service extension


  10. Add the dll as a named extension and set it's status to Allowed
    Now your dll is a allowed extension you can use within the web site.

  11. If you want to use Railo globally with every website you create, right click on websites and follow the instructions below.
    • Click on "Web Sites" Properties
    • Click on Home Directory/Configuration
    • Add two Application Extension Mappings for .cfm and .cfc pointing to D:\webroots\scripts\isapi_srun.dll Please uncheck the Verify that file exists checkbox.

  12. If you only want a certain webhost to act on .cfm and .cfc files with Railo, you need to execute the above actions for the respective Website.

  13. Save the configuration of the IIS to disk, by selection All tasks/Save Configuration to disk in the context menu of the IIS server

  14. restart the IIS service All tasks/Restart IIS... Now the website should run with Railo.

  15. If you experience any issues with Railo, please follow the instructions on the following documentation page: http://www.caucho.com/resin-3.1/doc/install-iis.xtp

Get the Flash Player to see this player.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
John's Gravatar Are there also instructions for IIS7 available?
# Posted By John | 07.12.08 22:59
Gert Franz's Gravatar No not yet. But there will be soon. I will blogpost about it.

Gert
# Posted By Gert Franz | 08.12.08 14:04
Compu_guy's Gravatar I was wondering if anyone has sucessfully been able to connect Railo with IIS7 yet?
# Posted By Compu_guy | 03.01.09 15:37
Jason Durham's Gravatar I've faught all day to make Railo 3.0 Community run on a Win2k3 box that already had IIS6 installed on it. It would be very helpful to have updated instructions. My machine is now hosed and I'm frantically looking for a way to remove Railo and get IIS working properly.
# Posted By Jason Durham | 03.01.09 20:00
Brett's Gravatar With the latest download: ralio-3.0.1.000 the host entry needs to have the root directory set to "." rather than the document directory for it to work.
# Posted By Brett | 23.01.09 23:44
Matt's Gravatar following your instructions, i've been able to get coldfusion test files in the webroot to work properly, but loading sites deeper in has been a problem.

when i point my browser to for instance, http://localhost/site1/, it attempts to download the index.cfm file as opposed to executing it.

any clue as to where i'm screwing up the configuration?
# Posted By Matt | 13.03.09 18:28
Mike's Gravatar Hi,

I'm trying to set this up on my Vista 32bit machine with IIS7. I have it working on port 8600 but I can't seem to get it to work on port 80 with 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="">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id="/">
<document-directory>C:/inetpub/wwwroot</document-directory>
</web-app>

<web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
<!--
- Administration application /resin-admin
-
- password is the md5 hash of the password.
- localhost is true to limit access to the localhost
-->
<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</root-directory>
<web-app id="/" document-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 my test script that prints the numbers 1 to 10 on the screen I get the following error in FireFox:

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 I 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
# Posted By Mike | 23.03.09 00:59
Adnan's Gravatar Well i need to know whether any one of you has tried to setup Railo on IIS5.1 (default IIS with XP).
I want to setup Railo on XP with IIS5.1.

Another question, this tutorial used Railo server, how can i achieve the same task with Railo Express. (developer edition)
# Posted By Adnan | 04.05.09 15:38
M. Vaughan's Gravatar GERT: Sorry I accidentally deleted the comment. Here it is again. Sorry M.


I'm having the same problem as Mike...

When I go to http://foo.com/test.cfm, I will get connection interrupted errors, but when I go to http://foo.com:8600/test.cfm, everything seems to work fine... Also interesting is that in either case, if I type the name of a non-existant cfm page, I will see an error page from railo stating the file cannot be found.

Suggestions?
# Posted By M. Vaughan | 11.05.09 09:14
Gert Franz's Gravatar M.
You should first of all contact our Mailing list: railo@googlegroups.com. Second, we'll try to replay the installation with a Resin 3.1.9 version as well since there were some issues with Resin 3.1.x below version 3.1.7. But in this case the installation needs to be made manually. Please check the corresponding documentation here:
http://classic.railo.ch/en/index.cfm?treeID=215
Gert
# Posted By Gert Franz | 11.05.09 09:17
jiaoyin's Gravatar how to setup more websites?
# Posted By jiaoyin | 04.07.09 05:05
Anthony Katgert's Gravatar No Gert I did not have fun with your tutorial, it still does not work, how about offering a license per VPS per month of using and have everything in good working order instead of offering these beta products
# Posted By Anthony Katgert | 18.07.09 12:47
Gert Franz's Gravatar Sorry Anthony that it didn't work as expected. The installation process is something straightforward. What's the issue? I would of course like to help if possible. Let me know...

Gert
# Posted By Gert Franz | 29.07.09 13:25
Railo Community's Gravatar Actually Anthony made a few simple mistakes nothing major we the "Railo community" where able to help out now he is a Railo convert. You IIS guide is really good but It might be nice to see this updated to 3.1 ( even though it's almost identical )
# Posted By Railo Community | 02.08.09 23:07
Mike's Gravatar Thank you so much for this! I tried setting Railo up once in the past and got quickly discouraged. This tutorial really made it EASY. THANK YOU! I'm now using Railo and I love it.
# Posted By Mike | 23.08.09 15:39
Ennio Bozzetti's Gravatar I followed this tutorial and I was able to get Railo to work on IIS6 on windows 2003... they only problem I have is that the root folder is not what I declared on the website on resin.conf like this

<host id="sptctest.com"> <root-directory>d:/websites/sptc</root-directory> <web-app id="/" document-directory="d:/websites/sptc"/> </host>

is this wrong?
# Posted By Ennio Bozzetti | 14.10.09 00:17
jbuda's Gravatar Is there a workaround for using port 80 in resin as opposed to 8600? Im getting the problem where i can see the website if i add the port into the url.

I have tried to change the default site in IIS6 to use a different port, but when i do and then try the website using Railo, i get a Bad Request error message.

Any help please!?
# Posted By jbuda | 03.12.09 12:04
Paul Kukiel's Gravatar If you follow this guide Railo will be connected to IIS and will be running over port 80 and 8600. The idea is that you only expose port 80 from behind your firewall. But to answer your question yes after you complete these steps Railo will be running on port 80 with IIS.
# Posted By Paul Kukiel | 03.12.09 15:54
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner