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>.
- Download Railo and execute the setup executable file
- Check if Railo runs correctly by calling http://localhost:8600/index.cfm
you should see the following:
- 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}
Then the reason for Railo failing to start should be displayed
C:\Program Files\Railo>httpd.exe -Xms512M -Xmx512M -conf conf/resin.conf -java_home jre -java_exe jre\bin\java - If Railo still does not run function properly, it is time to write an email to railo railo_talk@yahoogroups.com
- 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. - Set up a new website according to your needs by using the according wizard.
- If not already existent, create a folder named scripts inside a common directory (eg. D:\webroots\).
- Copy the file C:\Program Files\Railo\Wind32\isapi_srun.dll into the created directory
- Inside the IIS management console navigate to the Web Service Extensions
- Click on Add new Web service extension

- 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. - 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.

- Click on "Web Sites" Properties
- 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.
- Save the configuration of the IIS to disk, by selection All tasks/Save Configuration to disk in the context menu of the IIS server
- restart the IIS service All tasks/Restart IIS...
Now the website should run with Railo.
- 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



Gert
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?
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
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)
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?
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
Gert
<host id="sptctest.com"> <root-directory>d:/websites/sptc</root-directory> <web-app id="/" document-directory="d:/websites/sptc"/> </host>
is this wrong?
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!?
I have a strange problem. I am running VirtualBox with Windows 2003 Web Edition installed (it's my dev and test server). IIS6 + Resin + Railo works fine most of the time. All cfm webpages run correctly. However, when I try to reach http://www.mywebsite.com/railo-context, IIS throws a 404. Goodbye for form validation, cfimage, graphs, etc.
I can reach the administration panel only by adding port 8600 to the URL. Like http://www.mysite.com:8600/railo-context.
The problem seems to me, that IIS is trying to find the railo-context folder (which does not exist) before passing the request to Resin.
The funny thing is, that the some problem does not exist on my production server. There I can type http://www.mysite.com/railo-context, and it works. It is the same environment (Win2k3 + IIS + Resin + Railo).
Any idea?
Have you unchecked the "Verify that file exists" checkbox under Application/Configuration/mapping IIS setting? If you leave that checkbox checked, IIS will verify whether the file exists or not. And since it is only a mapping that only Railo will know about, you need to uncheck that box.
Gert
I am sorry that the example does not work for you. What problems have you experienced? I install it always in the same way and I hardly have any problems. Can you give us a hint?
Gert
Is that possible to have both ColdFusion 8 and Railo will work with IIS 6 in Windows XP? Currently I'm having all my ColdFusion 8 sites running under IIS and now i Installed Railo and i'm able to access both the Web and Server Administrator as "http://localhost:8600/railo-context/admin/web.cfm&...; . But all we want to do is just need to use IIS as a web server for Railo and ColdFusion 8 version. Let me know is that possible.
- I'm unable to reach the railo's admin panel... in any manner I try it didn't work!
- If I write as URL something like "http://site/appdirectory", the browser download me index.cfm in clear text. Obviously, if i write "http://site/appdirectory/index.cfm" all works fine.
I post my resin.conf file (sorry if it's a bit long):
<!--
- Resin 3.1 configuration file.
-->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">
<!-- adds all .jar files under the resin/lib directory -->
<class-loader>
<tree-loader path="${resin.home}/ext-lib"/>
<tree-loader path="${resin.root}/ext-lib"/>
<tree-loader path="${resin.home}/lib"/>
<tree-loader path="${resin.root}/lib"/>
</class-loader>
<!--
- Management configuration
-
- Remote management requires at least one enabled admin user.
-->
<management path="${resin.root}/admin">
<user name="admin" password="password" disable="true"/>
<resin:if test="${resin.professional}">
<deploy-service/>
<jmx-service/>
<log-service/>
<xa-log-service/>
</resin:if>
</management>
<!--
- Logging configuration for the JDK logging API.
-->
<log name="" level="info" path="stdout:"
timestamp="[%H:%M:%S.%s] {%{thread}} "/>
<!--
- 'info' for production
- 'fine' or 'finer' for development and troubleshooting
-->
<logger name="com.caucho" level="info"/>
<logger name="com.caucho.java" level="config"/>
<logger name="com.caucho.loader" level="config"/>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>2s</dependency-check-interval>
<!--
- SMTP server for sending mail notifications
-->
<system-property mail.smtp.host="127.0.0.1"/>
<system-property mail.smtp.port="25"/>
<!--
- Sets the default character encoding to utf-8
-
- <character-encoding>utf-8</character-encoding>
-->
<!--
- You can change the compiler to "javac", "eclipse" or "internal".
-->
<javac compiler="internal" args="-source 1.5"/>
<!-- Security providers.
- <security-provider>
- com.sun.net.ssl.internal.ssl.Provider
- </security-provider>
-->
<!-- Uncomment to use Resin's XML implementations
-
- <system-property javax.xml.parsers.DocumentBuilderFactory
- ="com.caucho.xml.parsers.XmlDocumentBuilderFactory"/>
- <system-property javax.xml.parsers.SAXParserFactory
- ="com.caucho.xml.parsers.XmlSAXParserFactory"/>
-->
<cluster id="app-tier">
<!-- sets the content root for the cluster, relative to server.root -->
<root-directory>.</root-directory>
<server-default>
<!-- The http port -->
<http address="*" port="8600"/>
<!--
- SSL port configuration:
-
- <http address="*" port="8443">
- <openssl>
- <certificate-file>keys/gryffindor.crt</certificate-file>
- <certificate-key-file>keys/gryffindor.key</certificate-key-file>
- <password>test123</password>
- </openssl>
- </http>
-->
<!--
- The JVM arguments
-->
<jvm-arg>-Xmx256m</jvm-arg>
<jvm-arg>-Xss1m</jvm-arg>
<jvm-arg>-Xdebug</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
<!--
- Uncomment to enable admin heap dumps
- <jvm-arg>-agentlib:resin</jvm-arg>
-->
<!--
- arguments for the watchdog process
-->
<watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
<watchdog-port>6600</watchdog-port>
<!--
- Configures the minimum free memory allowed before Resin
- will force a restart.
-->
<memory-free-min>1M</memory-free-min>
<!-- Maximum number of threads. -->
<thread-max>256</thread-max>
<!-- Configures the socket timeout -->
<socket-timeout>65s</socket-timeout>
<!-- Configures the keepalive -->
<keepalive-max>128</keepalive-max>
<keepalive-timeout>15s</keepalive-timeout>
<!--
- If starting bin/resin as root on Unix, specify the user name
- and group name for the web server user.
-
- <user-name>resin</user-name>
- <group-name>resin</group-name>
-->
</server-default>
<!-- define the servers in the cluster -->
<server id="" address="127.0.0.1" port="6800"/>
<!--
- Configures the persistent store for single-server or clustered
- in Resin professional.
-->
<resin:if test="${resin.professional}">
<persistent-store type="cluster">
<init path="session"/>
</persistent-store>
</resin:if>
<!--
- For security, use a different cookie for SSL sessions.
- <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
-->
<!--
- Enables the cache (available in Resin Professional)
-->
<resin:if test="${resin.professional}">
<cache path="cache" memory-size="64M">
<!-- Vary header rewriting for IE -->
<rewrite-vary-as-private/>
</cache>
</resin:if>
<!--
- Enables periodic checking of the server status and
- check for deadlocks..
-
- All servers can add <url>s to be checked.
-->
<resin:if test="${resin.professional}">
<ping>
<!-- <url>http://localhost:8600/test-ping.jsp</url> -->
</ping>
</resin:if>
<!--
- Defaults applied to each web-app.
-->
<web-app-default>
<prologue>
<!--
- Extension library for common jar files. The ext is safe
- even for non-classloader aware jars. The loaded classes
- will be loaded separately for each web-app, i.e. the class
- itself will be distinct.
-->
<class-loader>
<tree-loader path="${resin.root}/ext-webapp-lib"/>
</class-loader>
<!--
- Enable EL expressions in Servlet and Filter init-param
-->
<allow-servlet-el/>
</prologue>
<!--
- Sets timeout values for cacheable pages, e.g. static pages.
-->
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="60s"/>
<cache-mapping url-pattern="*.jpg" expires="60s"/>
<cache-mapping url-pattern="*.png" expires="60s"/>
<!--
- for security, disable session URLs by default.
-->
<session-config>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>
<!--
- For security, set the HttpOnly flag in cookies.
- <cookie-http-only/>
-->
<!--
- Some JSP packages have incorrect .tld files. It's possible to
- set validate-taglib-schema to false to work around these packages.
-->
<jsp>
<validate-taglib-schema>true</validate-taglib-schema>
<fast-jstl>true</fast-jstl>
</jsp>
</web-app-default>
<!-- includes the app-default for default web-app behavior -->
<resin:import path="${resin.home}/conf/app-default.xml"/>
<!--
- Sample database pool configuration
-
- The JDBC name is java:comp/env/jdbc/test
<database>
<jndi-name>jdbc/mysql</jndi-name>
<driver type="org.gjt.mm.mysql.Driver">
<url>jdbc:mysql://localhost:3306/test</url>
<user></user>
<password></password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
-->
<!--
- Default host configuration applied to all virtual hosts.
-->
<host-default>
<!--
- With another web server, like Apache, this can be commented out
- because the web server will log this information.
-->
<access-log path="logs/access.log"
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
rollover-period="1W"/>
<!-- creates the webapps directory for .war expansion -->
<web-app-deploy path="webapps"/>
<!-- creates the deploy directory for .ear expansion -->
<ear-deploy path="deploy">
<ear-default>
<ejb-server>
<config-directory>WEB-INF</config-directory>
</ejb-server>
</ear-default>
</ear-deploy>
<!-- creates the deploy directory for .rar expansion -->
<resource-deploy path="deploy"/>
</host-default>
<!-- configures a deployment directory for virtual hosts -->
<host-deploy path="hosts">
<host-default>
<resin:import path="host.xml" optional="true"/>
</host-default>
</host-deploy>
<!-- 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
-->
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
</host>
<host id="RailoTest">
<root-directory>C:/inetpub/wwwroot</root-directory>
<web-app id="/" document-directory="Railotest"/>
</host>
</cluster>
<!--
- Configuration for the web-tier/load-balancer
-->
<resin:if test="${resin.professional}">
<cluster id="web-tier">
<server-default>
<!-- The http port -->
<http address="*" port="9080"/>
</server-default>
<server id="web-a" address="127.0.0.1" port="6700"/>
<cache path="cache" memory-size="64M"/>
<host id="">
<web-app id="/">
<rewrite-dispatch>
<load-balance regexp="" cluster="app-tier"/>
</rewrite-dispatch>
</web-app>
</host>
</cluster>
</resin:if>
</resin>
Where is the problem???
just use the installers you find on projects.getrailo.org.
HTH
Gert
Gert
When i access a site, for instance localhost.. it excutes the cfm index file but it redirects it to /railo-context/