# \[ Allround deployment for Rails \] using nginx and passenger, best practice, how?

**URL:** <https://www.ruby-forum.com/t/allround-deployment-for-rails-using-nginx-and-passenger-best-practice-how/187525>\
**Category:** Rails\
**Created:** [April 24, 2010, 9:10pm UTC](https://www.ruby-forum.com/t/allround-deployment-for-rails-using-nginx-and-passenger-best-practice-how/187525 "2010-04-24T21:10:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubybox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85e7bf/32.png) [@rubybox](https://www.ruby-forum.com/u/rubybox)\
**Post date:** [April 24, 2010, 9:10pm UTC](https://www.ruby-forum.com/t/allround-deployment-for-rails-using-nginx-and-passenger-best-practice-how/187525/1 "2010-04-24T21:10:01Z")

</div>

Im ready setting up a CentOS 5.4 new secure server for hosting Rails  
applications,  
only the deployment setup is causing me mayor headaches.

I use:

- CentOS
- PHP-PFM
- Nginx
- Ruby Enterprise and Passenger

What I would like to do, and ask some advice for the tools I could  
best use for deployement,  
I need the deployemt to be as easy as possible. It should

- Automatically create a Nginx Vhost for ruby on rails hosting with a  
document root and domain name specified. ( DNS is allready set for  
domains )
- Automatically create appropiate folder on the server and upload my  
contents
- Automatically install the Gems my application requires
- Automatically restarts the application

What would be the best way to do above?

Ive been using webbynode before they had a 1 line " wn push " to push  
your application to the remote server, before using that command you  
had to setup the application with a command like " wn init servername  
[www.domain.com](http://www.domain.com)"

Anyone can give me some advice, examples, cap recipes to make above  
possible?  
Any help to achieve something of above would be great, thanks in  
advanche!
