Rails 3 with Thin Server – Removing Port 3000 from URL

phusion-passengerruby-on-rails-3thin

I have a small Rails app currently being served (dev and production) by Thin server on port 3000, on a Debian box that also has apache2 running, serving PHP applications.

I am not certain if this is even possible given the current setup but is there a way to remove the port number from the rails app url but still have Thin listening from the same port so not to bump into apache?

Current

https://my-rails-site:3000/

Proposed

https://my-rails-site/

Or should I just use something like Passenger?

Best Answer

No, this is not possible. Either run it from inside Apache (e.g. with passenger) or use Apache as a proxy to route it to another port.

However, if you don't use SSL at all on Apache (and that port is unused), you can run your app on port 443 if it also does the SSL, as port 443 is assumed if you give an HTTPS URL.