Configure coldfusion to litespeed

Discussion in 'Install/Configuration' started by x3mseth, Oct 27, 2006.

  1. x3mseth

    x3mseth New Member

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

    xing LiteSpeed Staff

  3. x3mseth

    x3mseth New Member

    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?
  4. xing

    xing LiteSpeed Staff

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

    xing LiteSpeed Staff

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

    x3mseth New Member

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

    xing LiteSpeed Staff

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

    x3mseth New Member

    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:
  9. mistwang

    mistwang LiteSpeed Staff

    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.

Share This Page