Simple CDN with Media Mover and S3

Updated 10/26/09: added improved url rewriting rules

So you want an easy to setup CDN that does not require much work and integrates with Drupal. Here is a quick setup to get to serve assets automatically from your Drupal files directory from S3

What you need:

  • Drupal site
  • Media Mover
  • S3 account

Get started
Install Media Mover, enable the S3, Directory, and AutoRun modules on your admin/build/modules page. Go to admin/settings/media_mover and enter your S3 credentials.

Media Mover

hook_filter() and Finding Context in D6

Drupal's filter system is a pretty nifty thing- you can grab text coming through the system and modify it to your hearts content. This makes for great things like replacing various kinds of tokens, automatically making URLs link, and so on. I've been looking at the wordfilter module to check for "bad words" coming through the text.

One of the things that this module lacks is logging of the users who are using "bad words". Being able to track usage by user creates the possibility of creating specific kinds of actions around the user- settings various flags, demoting permissions, alerting admin, etc.

Logging With Growl

I recognize that this is old news for some, but I've finally had reason to use the Growl module for Drupal. Getting fast reporting of logged errors is really handy without having to flip through tabs to find out what thing I just broke. There are not any instructions with the module, but it is easy enough to get it up and running. The real trick is making sure that you have the grownotify script in the correct place. Using this on your localhost is probably the simplist way to go given you will need to negotiate firewalls and IPs if you are trying to debug a remote server.

Pages