404 Not Found error in deploying rails 3.2.12 app (with engines) to SUB URI on nginx/passenger

前端 未结 2 946
误落风尘
误落风尘 2021-01-13 21:30

We need to deploy a rails 3.2.12 app to sub uri nbhy on a ubuntu 12.04 server. The rails app has 3 engines a

2条回答
  •  粉色の甜心
    2021-01-13 21:51

    Most likely the authentify engine is doing a redirect to /user_menus, instead of /nbhy/authentify. Is this a custom Rails or Sinatra app that you have written? If so, you need to change/configure the code of authentify to always append the current subdirectory under which the Rails app is hosted. You can get that from passenger by saying ENV['RAILS_RELATIVE_URL_ROOT'] in your code.

提交回复
热议问题