To get Rails up and running at TextDrive you will need to configure Lighttpd as your default server and then configure it to work with your Rails application. Unfortunately, it’s not possible to run Rails under Apache2 effectively in a shared hosting environment due to a bug in mod_fastcgi (fastcgi will suddenly run out of file handles). And you’ll find that Rails apps run faster under Lighttpd anyway.
Before you get started, there's a few things you’ll need:
- A port number for Lighttpd which you can obtain by filing a ticket.
- The lighttpd.conf file attached to the bottom of this article.
This file is used for configuring Lighttpd - The lighttpd.sh script attached to the bottom of this article.
This is a Bash script which allows you to stop, start, and restart Lighttpd. - The APPNAME.conf file attached to the bottom of this article.
This file is used to configure each of your Rails application. - The rails.sh script attached to the bottom of this article.
This is a Bash script which allows you to star or restart your Rails Applications.
This guide also uses a few conventions you should be aware of:
- USERNAME means the user name of your TextDrive account.
- APPNAME means the name you’ve chosen for your Rails application (you can substitute it for myapp, typo, or whatever makes sense for your application
- ~/ represents the root directory of your account. That’s the main directory you see when you log into you account either via SFTP or SSH. The full path can be represented as /users/home/USERNAME/.
With that out of the way, let’s start configuring your account in the next article Setting up and Configuring Lighttpd
