How to make Apache start Puma automaticaly on a Rails app

Is there a way to get an Apache vhost to start Puma automatically on a Rails app?

I’m installing Apache and Puma on a linux ubuntu 12.04 box, first I tried it with Passenger but it seemed quite slow compared to Puma.

Is there a preferred recommended setup that’s more ideal?

Thanks, The Dude Abides.

Is there a way to get an Apache vhost to start Puma automatically on a Rails app?

What is an "Apache vhost" ??

I'm installing Apache and Puma on a linux ubuntu 12.04 box, first I tried it with Passenger but it seemed quite slow compared to Puma.

Is there a preferred recommended setup that's more ideal?

I use nginx to proxy to Puma, but as far as "starting automatically" the Linux-standard approach would be to write a start/stop script for /etc/init.d/. Alternatively, use something like monit to manage any necessary processes (Puma, memcached, etc.)

HTH,

Is there a way to get an Apache vhost to start Puma automatically on a Rails app?

What is an "Apache vhost" ??

I hope this was just a joke. nginx is quite adept at dealing with virtual hosting as well.

I'm installing Apache and Puma on a linux ubuntu 12.04 box, first I tried it with Passenger but it seemed quite slow compared to Puma.

Is there a preferred recommended setup that's more ideal?

I use nginx to proxy to Puma, but as far as "starting automatically" the Linux-standard approach would be to write a start/stop script for /etc/init.d/. Alternatively, use something like monit to manage any necessary processes (Puma, memcached, etc.)

What is ideal will always depend on your application and usage profile. Many things work, some better than others, again, depending on each case.

Hassan mentioned nginx, I am using nginx as well, with several unicorns. I haven't done extensive research, I just knew that Apache+Passenger was going to wreak havoc on my already bloated VPS. If you are just using a single server the nginx+puma/thin/unicorn things works well.

Unless you are using your linux box for serving up multiple vhosts and web apps in PHP, Perl, and such, it really makes more sense to me to put in a trim, fast web server like nginx for tossing back static content, and something to manage the Rails stuff such as puma.

Well my ideal situation would be Nginx with puma on the vps. However I couldn’t get nginx to recognize the vhosts based on the blog articles I followed as examples, so I went to Apache/Passenger, but too slow. Then Apache/Puma, much faster.

Thanks for your responses, can you point me to any article or instructions on how to get it setup with Nginx and Puma with a way for Puma to auto start when Nginx starts.

I have some legacy coldfusion apps to move off a windows host, but I think I’ll just put them on a separate vps and keep the Rails apps on its own vps. The benchmarks seem to indicate Puma as being lightest/fastest at this time, it was a v noticeable diff between Passenger and Puma.

Thanks for your responses, can you point me to any article or instructions on how to get it setup with Nginx and Puma with a way for Puma to auto start when Nginx starts.

As far as the first part - have you been using the actual documentation, e.g. Server Block Examples | NGINX ? I don't recall having any problems setting up nginx originally.

And as for the second part, I'll repeat: