CentOS - Nginx, Rails, and Mongrels
Following from the mongrel and mongrel cluster article, we can now look at configuring Nginx to proxy to a mongrel cluster so we can serve our Ruby on Rails application.
The process is very easy and can simply be repeated for serving multiple domains.
CentOS - Apache, Rails, and Mongrels
Following from the mongrels and mongrel cluster article, we can now look at creating and configuring Apache to proxy to a mongrel cluster so we can serve our Ruby on Rails application.
CentOS - Mongrel and mongrel_cluster installation
There are variety of options open to the sysadmin when serving Ruby applications.
One of the original ways is to use the mongrel web server. Requests are proxied to the mongrel(s) from the main web server (Apache, Nginx, etc).
The article may seem quite lengthy but two subjects are tackled here. One is the basic mongrel gem itself but then we move onto the mongrel_cluster gem.
Take each section at a time as each one builds on the previous explanation.
CentOS - Nginx, Rails and Thin
Having installed the thin web server for Ruby, we can now look at configuring a Nginx vhost to proxy to thin so we can serve our Ruby on Rails application.
The process is easy to follow and easy to repeat for hosting multiple domains.
CentOS - Apache, Rails and thin
Following from the thin web server for Ruby article, let's look at creating and configuring Apache to proxy to thin so we can serve our Ruby on Rails application.
CentOS - thin web server for Ruby
There are variety of options open to the sysadmin when serving Ruby applications.
One of them is thin. This is a 3rd party web server that is proxied to from the main web server (similar to mongrels in a general setup). Let's take a look at installing thin.
CentOS - using mod_rails to serve your application
Following from the first article, we now have passenger (mod_rails) installed.
As such, we can move on and create a Ruby on Rails application and see how easy it is to serve using passenger.
CentOS - mod_rails installation
Phusion's Passenger (mod_rails) is an exciting development in serving your Ruby on Rails application with the Apache web server.
Incredibly simple to install and use, you can have a rails application up and running in no time. You don't have to worry about ports or setting up a proxy to another server.
CentOS - Installing MySQL (with Rails and PHP options)
Installing MySQL on CentOS is very simple using the 'yum' package manager.
This article will go through the install process and also look at what other packages are needed for MySQL to integrate with Ruby on Rails and with a standard PHP install.
CentOS - Ruby on Rails
In the CentOS setup articles (page 1 and page 2) we secured, updated and personalized the install to add some working software.
We also installed the development tools package. Now we can go ahead and install Ruby on Rails.
CentOS - Nginx virtual host settings
The previous CentOS Nginx Virtual Hosts article introduced the basics of the setting up virtual hosts.
This allowed us to serve multiple domains from a single IP address and Slice. Now we can look in detail at more of the settings available to us in the Virtual Hosts files.
CentOS - Nginx Virtual Hosts
Now we have Nginx installed (whether via the package manager or from source) we are in a position to serve multiple domains using Virtual Hosts.
Do note the layout used in this article is explained here - feel free to use the directories of your choice.
CentOS - Nginx Configuration
Whether you have installed Nginx using the package manager or from source, you will need to look at the main configuration file and see what may need changing and optimizing.
Although I'll make some suggestions, the aim is not to change a great deal at this point. Rather, we will look at the main settings, see what they mean and what a change will actually do.
CentOS - Nginx from source layout
Following from the main installing Nginx from source and creating an init script articles we can now move onto looking at the Nginx layout.
The idea of this article is to change the default layout to one more in keeping with the 'CentOS' style. Installing Nginx via the package manager creates this layout automatically - we need to do it by hand.
CentOS - Adding an Nginx Init Script
If you decided to install Nginx via source (see the previous article) you would have the latest and greatest version.
However, one disadvantage of installing from source is that init scripts are not created. No problem, let's go ahead and create one for easy control of Nginx and to ensure it restarts on a reboot.
CentOS - Installing Nginx from source
Nginx is a popular lightweight server for those who do not need the bulk and extra services that Apache may offer.
This article will look at installing Nginx from source on a CentOS slice.
CentOS - Installing Nginx via yum
Nginx is a popular lightweight server for those who do not need the bulk and extra services that Apache may offer.
This article will look at installing Nginx on a CentOS Slice using the 'yum' package manager.
CentOS - Apache Virtual Hosts #2
Following on from the first CentOS - Apache Virtual Hosts article, we can now look in detail at some of the settings available to us in the Virtual Hosts file.
This will enable us to have complete control of the domain we want to serve.
CentOS - Apache Virtual Hosts #1
Now we have Apache installed and running, we can configure it to serve multiple domains using Virtual Hosts.
Do note the layout used in these articles is explained here - feel free to use the directories of your choice.
CentOS - Apache configuration #2
Continuing from the first CentOS Apache configuration article, we now look at some of the other settings in the main httpd.conf file and what they can do.
Concentrating on efficiency and security, this will end our httpd.conf journey (for now).
CentOS - Apache configuration #1
Let's take a look at the main httpd.conf for our CentOS Apache install.
We're not actually going to change a lot at this point, just look at the main settings and see what they mean and what a change will actually do
CentOS - Installing Apache and PHP5
CentOS comes with Apache v.2.2.3 and PHP v.5.1.6 and they are easily installed via the default CentOS Package Manager 'yum'.
The advantage of using yum (as opposed to installing via source code) is that you will get any security updates (if and when distributed) and dependencies are automatically taken care of.
CentOS setup - page 2
In page 1 of the CentOS setup, we completed the ssh configuration along with a basic iptables install.
Let's move on and install some personal configuration files to make our life easier. Once done, we can update the install and create a solid base for the 'meat' of the server.
CentOS setup - page 1
These CentOS articles will take you from a 'barebones' CentOS 5.1 Slice to a secured and up to date Slice ready for your server software (or whatever you use the Slice for).
Not only that, you will have a better understanding of what is going on and, more importantly, why it's going on.

