There are many different ways to configure a Rails server. I donβt know if there is such a thing as an βidealβ configuration. I will tell you how my server is configured and why.
Operating System : Linux, any distribution.
This is the only server platform that makes any sense. The Ruby community is centered around Linux, but BSD would also be a great choice. I like Linux the most.
OSX is a great development platform, but the extra cost doesn't really buy you on the server side, which you can't get on Linux. And Apple is phasing out the Xserve platform, so there will still be no future in the future. Don't even think about using Windows .
Web Server : Apache + Phusion Passenger
I recommend Apache because it is everywhere. Everyone knows that. Getting support is easy.
Phusion Passenger is probably the easiest application server to get started. Here is a VirtualHost configuration example:
<VirtualHost xxxx:80> ServerName xxxx.com DocumentRoot /var/www/xxxx/current/public PassengerHighPerformance on <Directory "/var/www/xxxx/current/public"> AllowOverride all Options -MultiViews </Directory> AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/json AddOutputFilterByType DEFLATE image/jpeg, image/png, image/gif </VirtualHost>
What is it. (And most of this is not absolutely necessary)
Ruby interpreter : Ruby Enterprise Edition
I use this instead of vanilla MRI, because it is slightly more efficient in terms of memory, which is of great importance on the server. It is also made for integration with the Passenger.
One drawback of REE is that it is based on 1.8.7 . Instead, you can use 1.9.2 because there is a significant performance advantage.
Gemstone Management : RVM
RVM allows you to create sandboxes for sandboxed applications for different applications if there are version conflicts. Also recommended for your development environment.
Deployment System : Capistrano
If you are not using Capistrano, you should. This will be the biggest time savings that you can make to deploy production. It will also make deadback easy if a problem occurs.
You must also set an ExceptionNotifier . If there is an exception on your production server, you should be aware of this.
I also recommend checking out NewRelic RPM for profiling. Even the free version provides some useful information.