Running SSL Rails app on apache server already in use

SSL and Rails is proving to be somewhat confusing and difficult to get going for me.

I already have an HTTPS apache instance running off my domain -- legacy secure web app. (lives at https://www.mydomain.com say)

Now I want to develop a new app on the same secured domain with rails (out of a subdir, symlinked or something at https://www.mydomain.com/railsapp ) But how can this work?

To get that to work on a normal insecure instance, I would just put it at http://www.mydomain.com:3000 or some port other than port 80.

But since SSL is involved, and I already have an instance running -- meaning its occupying port 443 .... how can I add a rails app to this domain??

Suggestions appreciated!

run your app on 127.0.0.1:SOMEPORT

and proxy traffic from apache to that ip.

Chris Earle wrote:

The problem with multiple apps and ssl is that apache (assuming you are using apache as a front end) does not support SSL with named virtual hosts. Annoying, but it makes sense when you think about it, apache does not know the domain name before dishing up it's certificate, so there can only be 1 certificate, and this 1 cert will be tied to 1 domain.