Posts [ 2 ]

Topic: Rails app inside another SSL Rails app

Hello all.

We currently have a production rails 3 site running using phusion passenger. It is running on SSL.

However our client also wants a test site and it must also use SSL. We do not have the time, free IPs or money to setup a separate SSL app on a different sub-domain so I have been told to try and put a clone of the main app under the /test path.

My first thought was to setup the test app on a different port and reverse proxy to it inside a location directive of the main site's virtual host.

However this does not appear to work correctly. I believe that the test app's generated urls always cut off the /(I haven't been able to access the app proper since I cannot login beause of the redirect to the slash'less route and accessing the correct route still results in a redirect)

http://www.site.comtest

Because this is a Rails 3 app I cannot use the config.action_controller.relative_url_root (or whatever it was) so I am, for the moment just sticking all the routes inside a large

scope '/test' do
...routes here...
end

If anyone has any experience or suggestions on how to proceed they would be most appreciated, I am not an apache expert and have never had to do this (frankly PITA) setup before.

Note that I cannot use a self-signed cert on a separate subdomain; the only option available is to stick the test applicaton in the /test path/