PDA

View Full Version : Configure coldfusion to litespeed


x3mseth
10-27-2006, 12:37 PM
Hi, I'm quite new using LiteSpeed, but i find it really interesting project. I would like to connect it to ColdFusion web server to pass dynamic content to the ColdFusion Web server. My ColdFusion application lives in the same machine at (http://localhost:8300/cfmx)
Here's what i have done so far
1. Define an external app to localhost:8300 at VirtualHost Level
2. Define an static context /cfmx to the webroot of my ColdFusion Server at VirtualHost Level
3. Add a Script Handler Definition for cfm prefix to by handled by my external app defined earlier.

So, when I request http://localhost/cfmx all i get is blank pages, and seems to me, Dynamic content is not being passed to the external app.

Thanks in advance for your help

xing
10-27-2006, 01:07 PM
ColdFusion is just a custom script language on top of a java servlet engine.

Check our online demo's admin page to see how we setup a sample connector to Tomcat/JSP. It will apply to ColdFusion as well.

http://www.litespeedtech.com/products/webserver/demo/

x3mseth
10-27-2006, 02:10 PM
Hum.. well, yes, if I where running ColdFusion on some J2EE Server that supports AJP, but, I guess JRUN (The J2EE Server I'm using) doesn't support AJP. Am I wrong?

xing
10-27-2006, 02:16 PM
Method 1:

1) ColdFusioin -> TomCat/Etc -> AJP -> LiteSpeed

Method 2: I think are you trying to do this:

2) ColdFusion -> HTTP PROXY -> LiteSpeed


You don't need a script definition within litespeed for a http proxy and you should not use "static" type context to bind coldfusion to litespeed. Instead create a "external application" of type "web server' and enter the IP:port.

And then create a "proxy" context passing all matching web requests to that IP:port.

xing
10-27-2006, 02:19 PM
The forum parser doesn't like IP : PORT string. =)

In any case, if JRUN is a fully capable web server, then the "proxy" context/external app method will work.

Forgot to mention that when you create the "proxy" context, you need to select the "external app" you just created.

x3mseth
10-27-2006, 02:42 PM
Ok, here's what I'm doing

1. Create a WebServer External App pointing to localhost:8300
2. Create a Proxy Context on /cfmx/ to the External App just created
3. Restart :P


Now, when i go http://localhost/cfmx/ the request passes a file to download (the index.html file in the webroot of my localhost:8300). Any file I try to request from litespeed it returns the flat file, and it's not been parsed by ColdFusion.

BTW, Thanks in advance, greate support here!

xing
10-27-2006, 02:55 PM
The proxy context just turns LiteSpeed into a http proxy when the context match so litespeed would just return whatever data it was returned to it by the backend server unmodified. Sounds like a JRUN problem.

Make sure the virtual host is correctly configured and that the requests are proxies to the backend.

x3mseth
10-27-2006, 03:10 PM
humm, I'm using the "Example" Virtual Host, and If i point my browser to http://localhost:8300/cfmx I can see my application working fine. :confused: :confused:

mistwang
10-31-2006, 10:59 PM
You JRUN server need to be configured to handle request to http://localhost/cfmx exactly the same way as request to http://localhost:8300/cfmx, LSWS just forward the original request without changing the "Host" header from "localhost" to "localhost:8300". Maybe your JRUN server require it to be "localhost:8300", otherwise, just return the index page.