Starting Rails server on boot on CentOS - ruby-on-rails

I'm pretty new to rails and trying to figure things out, I looked online but not much luck.
I have some servers that are running rails on startup without using rc.local at all, but I can't figure out why.
All I need is for rails to start on boot in production mode on port 80 (instead of 3000, as the rest of the servers also start on port 80).
Any ideas?
ATM relaying on webrick

Have a look at setting up nginx with ruby enterprise edition.

Check out Phusion Passenger. It supports both the standard Apache web server and Nginx web server.
http://www.modrails.com/

Related

Running faye server with nginx and passenger?

I have successfully installed number of rails applications with nginx and passenger, but with a faye application i don't know what should be:
Nginx conf for a faye application, A nice self-explanatory tutorial will suffice.
List of things that I need to have installed to run faye server
Is it mandatory to open 443(https) port for the server and is port 9292 not needed?
Do i run faye server from rackup command in a screen or not? If no, what root do i set in nginx conf for nginx to know the start point?
How does thin server come into play? Is it needed to run?
I followed this tutorial to make my faye app. So far I have been using it through heroku, but due to latency issues I have to move to a server in the local region
Here's an example to a deployed faye app .
So far I have faye app, passenger and nginx installed on the server(centos). I am just looking for answers to above questions to proceed further. Please help Thanks in advance

How to access Rails WEBrick running on a VPS

I'm fairly new to Rails and VPS. I created a SSH tunnel and managed to install Ruby/Rails, then I created a simple scaffolding app to play around. One question now coming up is, how I can access the running WEBrick server via my browser? I tried the IP of my VPS and added XXX.XXX.XXX.XX:3000 as the port. But for some reason it does not work. Any idea? Thanks
Try port 80 as 3000 can be quite sensitive to firewalls and certain ISP's

Setting up multiple rails apps using nginx and Puma

I have a web server serving multiple Rails applications using a combination of nginx and Passenger. This is pretty straightforward, because the Passenger install sets-up pretty much everything you need to connect to nginx.
I found "Rails app with Puma" that seems to explain how to set up nginx and Puma together. How would this configuration need to be modified in order to serve a second Rails application on the same server?
Also, this guide doesn't say anything about restarting the application automatically if there is a system reboot or some other issue. Is there a way to do that? The nginx + Passenger combo seems to do it by default.

Rails and https (ssl) running on linux

I've been looking for tutorials how to start SSL on my localhost. But ones that I found was related to using nginx or apache. I'm wondering is it possible to use HTTPS(SSL) on localhost using usual ruby server (like webrick, thin, unicorn)?
Have you checked Thin with SSL support and ruby-debug
Additionally you will need your own certificate try this page http://hints.macworld.com/article.php?story=20041129143420344 for a step-by-step tutorial for osX

Rails framework & Nginx web server

As we install rails it uses its own web server WEBrick. If i want to run ths application in Nginx server, then how to configure or set the Nginx web werver?
You should run your rails application in a production server such as mongrel_cluster or thin (I have used the former, and am currently switching to the latter). To put nginx in front of it, I would use the upstream and proxy_pass directives. I found a nice blog post comparing ways of running rails applications that shows their config for mongrel_cluster + nginx.
Passenger is also available for nginx, I've used that with Apache and it was very easy to set up.

Resources