# Running SSL Rails app on apache server already in use

**URL:** <https://www.ruby-forum.com/t/running-ssl-rails-app-on-apache-server-already-in-use/104430>\
**Category:** Rails\
**Created:** [May 17, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/running-ssl-rails-app-on-apache-server-already-in-use/104430 "2007-05-17T21:44:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![azraelnewtype](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Post date:** [May 17, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/running-ssl-rails-app-on-apache-server-already-in-use/104430/1 "2007-05-17T21:44:24Z")

</div>

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](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](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](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!

## –

Chris E.

---

<div class="post-metadata">

**Author:** ![azraelnewtype](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Post date:** [May 18, 2007, 4:26am UTC](https://www.ruby-forum.com/t/running-ssl-rails-app-on-apache-server-already-in-use/104430/2 "2007-05-18T04:26:06Z")

</div>

run your app on 127.0.0.1:SOMEPORT

and proxy traffic from apache to that ip.

---

<div class="post-metadata">

**Author:** ![azraelnewtype](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/13edae/32.png) [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Post date:** [May 18, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/running-ssl-rails-app-on-apache-server-already-in-use/104430/3 "2007-05-18T23:08:24Z")

</div>

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.
