URI only works under "/" in rails context

Discussion in 'Ruby/Rails' started by dlhhyct, Oct 22, 2006.

  1. dlhhyct

    dlhhyct New Member

    in rails context, when I change URI to other values not "/", like "/xyz", rails app doesn't work and say "/xyz" not recognized. I thought lsws will translate everything to under new context root "/xyz".

    I have a typo blog vhost runs on www.mydomain.com, now I like to run 2nd rails forum app under url "www.mydomain.com/forum", is it possible?

    In typo vhost,
    * I tried forum vh as ext web server, then proxy, result "file not found"
    * I tried forum vh as 2nd rails context with uri "/forum", forum vh can't recognize "/forum"

    so is my choice only limited to vh forum.mydomain.com?
  2. xing

    xing LiteSpeed Staff

    If you have 2 contexts, "/" and "/forum" each points to a different ruby rails application using our rails context, make sure "/forum" context has higher priority: lower sequence/context value.
  3. dlhhyct

    dlhhyct New Member

    still same

    so I have "/forum" sequence 1, "/" 2, still same, route recognition failed.

    do I have to modify the forum app, prefix "/forum" in every routes in forum_app/config/routes.rb ?
  4. xing

    xing LiteSpeed Staff

    Correct, you will need to modify the ruby app routing to recognize /forum as the "base"/root. By default I believe all ruby apps recogonize "/" as base/root.

Share This Page