Mosso & Textpattern

For the past few weeks, I have been trying out a new host, Mosso.com. During my search for solid hosting, I have been using my own site as a guinea pig.

Backstory

I had been on the lookout for a new host, since the up-time at DreamHost had been questionable over the past few months. They also recently had a security breach that left quite a few user accounts vulnerable. Thankfully, mine was unaffected. Still, I feel a certain responsibility to keep Godbit reliably available, as the forum is a resource many people use daily.

Previously, I tried the Grid-Service plan at Media Temple, and loved it. It handled the traffic to SonSpring just fine, with a GPU (Grid Performance Unit) projection of about 45% resources used. However, I knew that a single Grid plan wouldn't support the additional traffic of Godbit, so I did the next logical thing and signed up for a Dedicated-Virtual plan. However, I quickly realized this wouldn't do.

There are two things I like about DreamHost and the Grid plan at Media Temple. First, the FTP directory structure makes sense, with primary domains and subdomains treated equally, in directories that reside side by side. Secondly, is a control panel that puts a slew of options at your fingertips (arguably, Media Temple has a better admin UI than DreamHost).

I dislike that Media Temple's Dedicated-Virtual plan doesn't feature the beautiful hand-crafted panel used on the Grid. Instead, you are forced to administer sites via Plesk, a Windows-ish eyesore to put it bluntly. Just trying to use it creates multiple errors on Firebug as you click around.

I also dislike how the Dedicated-Virtual plan handles FTP directories, nesting subdomains within the primary domain. This makes it cumbersome to redesign on a subdomain, then "flip the switch" so to speak.

Enter Mosso

I first heard about Mosso from Alex Giron, whom you may know as the guy who runs CSS Beauty (to be fair, CSSb is hosted at Media Temple). A fellow Dallas-based web developer, Lauren Smith, had recently documented his switch to Mosso. After talking further with Lauren, he said his experience with Mosso has been positive, so I decided to give 'em a try.

For me, this is the hosting I've been looking for. It boasts the reliability of Rackspace, the platform upon which Mosso is built. The admin management panel is very well done, offering the control I need in an intuitive manner. The FTP directory structure is conducive to how I like to organize things. Their tech support has also been amazing, with 24/7 coverage via live chat.

Textpattern Tweak

With the drama of my meandering hosting experience out of the way, let me offer this quick tip for those using Textpattern who might consider hosting with Mosso. Firstly, make sure to un-comment the RewriteBase line (remove the # sign), and put / if you run Textpattern from your domain root.

Secondly, Mosso seems to handle 403 Forbidden errors slightly different than either DreamHost or Media Temple, serving up an Apache page, rather than passing the error on to Textpattern for processing. This is a simple enough fix, simply put ErrorDocument NNN /path where NNN is the error number and "/path" is the page you want to serve up for the corresponding error.

Here is an example of my .htaccess file:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

#Remove www.
RewriteCond %{HTTP_HOST} ^www.sonspring.com$ [NC]
RewriteRule ^(.*)$ https://sonspring.com/$1 [R=301,L]

#Textpattern
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php

</IfModule>

Options -Indexes

ErrorDocument 400 /whoops
ErrorDocument 401 /whoops
ErrorDocument 403 /whoops
ErrorDocument 404 /whoops
ErrorDocument 500 /whoops

Other Tips

Obviously, I'm being lazy and simply passing all error types to one page, but you could just as easily have different scenarios for each. Note that I am stripping "www." when it is added to my site's URL, simply because it is antiquated and unnecessary. According to some SEO experts, this prevents "splitting the vote" between example.com and www.example.com.

The line that says Options -Indexes is one I would recommend, especially if you use DreamHost, which causes any directory without an index.* file to auto-generate a list of all files contained within. Meaning, someone could go to your /images directory and easily steal all of your graphics. By taking necessary precautions, it generates a 403 Forbidden error instead.

Sometimes when doing client work, I do want Apache to generate a listing of all files contained in a directory, allowing me to quickly upload samples via FTP and let them dig through. For this, simply put Options +Indexes and voila, no 403 error is shown - instead a listing of files appears.

Summary

So, for those of you who wanted to know what's up with me switching hosts so often, there you go. Hopefully some of the .htaccess tips have proven helpful, whether you use Textpattern or consider hosting with Mosso.