After running nearly two years on a Rimuhosting VPS with Debian Sarge, we decided to switch over to a Rimuhosting Miro4 on CentOS 5 with Plesk 8.2 and do some hosting. Since it seems that since we’re the primary tech support contact for our clients regardless of the fact that most of them have direct relationships with their web hosts, we’ve decided to start hosting client sites ourselves (when appropriate), on our VPS. VPS hosting for Rails sites is usually a better solution anyway, since nearly every shared host I’ve attempted to host a Rails app on until now has either been very slow, or very unreliable.
Overall, it’s been a lot of fun getting things up and running, and it’s been quite painless. Plesk automates a lot of the tasks that I had to do manually on Sarge, a lot of which I really didn’t want to know about anyway. (Such as editing dovecot config files manually… ugh)
I was a bit concerned about how to host Rails apps with Plesk, and I’m pleasantly surprised at how easy it is. CentOS5 ships with Apache 2.2, with it’s awesome mod_proxy_balancer. It’s definitely not the highest-performance solution available, but it’s easy to set up, and it integrates well with the Plesk workflow. This blog is running on two mongrels with mongrel_cluster, and balanced with mod_proxy_balancer. I simply had to set up a vhost.conf file based on the setup provided by Coda Hale for my subdomain, get mongrel_cluster configured to match, and I was done. There’s a couple other steps in there, which I’ll detail in a future post.
IMAP Problems
The only real problem I’ve experienced is Apple Mail’s rebellion against the IMAP namespace structure of Courier IMAP, which is the default mail server with Plesk. Apparently under the IMAP spec mail servers are free to choose a namespace separator as well as a namespace prefix. This can be autodiscovered during the HELO process with the server, but Mail ignores this. Mail DOES allow you to set an IMAP prefix under the Advanced account settings tab, which on Courier servers is INBOX. Setting that is the first step, which will get Mail to correctly pick up the Sent and Trash folders on the server. However, there is still difficulty when you wish to create new “Mailboxes” on the account, which is Mail’s term for subfolders. In this case, if you wish to create a first-tier subfolder under the account (i.e. Account Name/New Folder) you must specify the mailbox name as “INBOX.New Folder” to correctly set it up. However, for subfolders underneath this new folder (i.e. Account Name/New Folder/New Subfolder), you simply add a new Mailbox underneath New Folder as you would expect, with no need to specify any prefix.