Ubuntu Intrepid - Nginx, rails and thin

Having installed the thin web server for Ruby, we can now look at configuring an 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.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - Nginx Virtual Hosts #2

The previous Ubuntu Intrepid 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.


Ubuntu Intrepid - Nginx Virtual Hosts #1

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.


Ubuntu Intrepid - 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 optimising.

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.


Ubuntu Intrepid - 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 'Debian' style. Installing Nginx via the package manager creates this layout automatically — we need to do it by hand.


Ubuntu Intrepid - 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 an Ubuntu Intrepid Slice.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - Installing Nginx via aptitude

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 an Ubuntu Intrepid Slice using the 'aptitude' package manager.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - Apache, Rails and mongrels

Following from the mongrel 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.


Ubuntu Intrepid - mongrel and mongrel cluster

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).


Ubuntu Intrepid - 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.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - Installing MySQL (with Rails and PHP options)

Installing MySQL on Ubuntu Intrepid is very simple using the 'aptitude' package manager.

This article will go through the install process and also look at what other packages are need for MySQL to integrate with Ruby on Rails and with a standard PHP install.


Ubuntu Intrepid - Ruby on Rails

In the Ubuntu Intrepid setup articles (page 1 and page 2) we secured, updated and personalised the install ready to add some working software.

We also installed the build-essential package. Now we can go ahead and install Ruby on Rails.


Ubuntu Intrepid - Apache Virtual Hosts #2

Following on from the first Ubuntu Intrepid - 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.


Ubuntu Intrepid - 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.


Ubuntu Intrepid - Apache configuration #2

Continuing from the first Ubuntu Intrepid Apache configuration article, we'll now look at some of the other settings in the main apache2.conf file and what they can do.

Concentrating on efficiency and security, this will end our apache2.conf journey (for now).


Ubuntu Intrepid - Apache configuration #1

As we know from the previous article, Ubuntu Intrepid uses a different layout from other non-Debian based systems - let's move on and take a look at the main apache2.conf and ports.conf.

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.


Ubuntu Intrepid - Apache config layout

Ubuntu Intrepid Ibex uses a different Apache layout than you may have encountered if you have used Apache with non-Debian based Operating Systems.

The differences are not huge and, indeed, help in configuring and deploying websites.


Ubuntu Intrepid - installing Apache and PHP5

Ubuntu Intrepid Ibex comes with Apache v.2.2.9 and PHP v.5.2.6 and they are easily installed via the default Ubuntu Package Manager 'aptitude'.

The advantage of using aptitude is that you will get any security updates from Ubuntu (if and when distributed) and dependencies are automatically taken care of.


Ubuntu Intrepid setup - page 1

These Ubuntu Intrepid Ibex articles will take you from a 'barebones' Ubuntu Intrepid Slice to a secured and up to date Slice ready for your server software (or whatever you use the Slice for).

Securing your Slice as soon as possible is a great way of starting your Slice administration.


Ubuntu Intrepid setup - page 2

In page 1 of the Ubuntu Intrepid 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.