Question

I always appreciate your great solution! I recently set up my VPS server from Digital Ocean. It's Ubuntu 12.04 32bit with Ruby 2.0.0 and Rails 4.0.0. As you can see, you can see my app on here : [http://192.241.210.52:3000/]

However, the physical directory of the app looks like this /var/www/geekerati/treebook

When I type 'rails server' inside of 'treebook', why does this link only provide 192.241.210.52:3000? 192.241.210.52 is my private server ip. I want to change it to my domain, http://app.geekerati.me. Also, this domain will be connecting to the treebook app.

How should I change this? maybe at Apache's Rails config file?? (First of all, I set up my domain's DNS correctly to this private server's IP. And, I edited my Apache2 config to make my rootDirectory be /var/www/my_virtual_host_username/treebook. So, app.geekerati.me is connected to '/var/www/my_virtual_host_username/treebook')

Was it helpful?

Solution

The beginning of this message seems to be missing context... Anyway, to run in "production mode" you need to configure your app in Ubuntu's Apache enabled sites (running rails server on the server is for development only, hence the :3000 port). To run Rails on Apache, you'll likely want to use Passenger. Here is their full support link and here is a nice setup guide for using it to serve rails apps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top