Recent Blog Posts

Configuring CloudFlare with Drupal 8 to protect the Pi Dramble

In a prior post on the constraints of in-home website hosting, I mentioned one of the major hurdles to serving content quickly and reliably over a home Internet connection is the bandwidth you get from your ISP. I also mentioned one way to mitigate the risk of DoSing your own home Internet is to use a CDN and host images externally.

At this point, I have both of those things set up for www.pidramble.com (a Drupal 8 site hosted on a cluster of Raspberry Pis in my basement!), and I wanted to outline how I set up Drupal 8 and CloudFlare so almost all requests to www.pidramble.com are served through CloudFlare directly to the end user!

CloudFlare Configuration

Before anything else, you need a CloudFlare account; the free plan offers the minimal necessary features (though you should consider upgrading to a better plan if you have anything beyond the simplest use cases in mind!). Visit the CloudFlare Plans page and sign up for a Free account.

Drupal VM's latest update adds Redis, PHP-FPM support to Apache

tl;dr: Drupal VM 2.2.0 'Wormhole' was released today, and it adds even more features for local dev!

Over the past few months, I've been working towards a more reliable release cadence for Drupal VM, and I've targeted one or two large features, a number of small improvements, and as many bugfixes as I have time to review. The community surrounding Drupal VM's development has been amazing; in the past few months I've noticed:

Podcast interview with Len Epp on the LeanPub podcast

Today LeanPub published it's 25th episode of the LeanPub Podcast, and in it, Len Epp asked me about a wide range of topics, including AI, the impact of smartphones on interpersonal relationships, how I got started in computing, and how I self-published a bestseller, Ansible for DevOps, on LeanPub.

A few decent quotes from the interview:

[On how I learned technical/tutorial writing:] Go sit down, sit through all the tutorials, and then write up a guide that will help people to quickly get up to speed on it”. Because the manuals you get with the manufacturer are pretty much junk.

As a technical person I hate the idea of DRM on a book. Because it’s like, when I go to a bookstore and buy a book, I don’t have like a locking mechanism that I have to unlock to read it.

A good use for a Raspberry Pi - Missile Control

My brother gave me what will likely be one of the best useless-but-oh-so-fun gifts ever—a Dream Cheeky Thunder USB foam missile launcher.

Dream Cheeky Thunder Missile Launcher - USB

The launcher can be used with an extremely boorish app for Mac or Windows... or you can control it with some basic USB communication! I've found a few projects which allow the launcher to be controlled via any OS with Python fairly easily:

Hello, World! (For the thousandth time)

This is yet another 'hello, world' post on yet another personal blog. I've used static site generators, hosted services, Drupal, Wordpress, and a plethora of other platforms for blogs through the years, but I'm finally looking forward to consolidating everything—from every blog I've consistently written—in this one central blog. Hopefully I'll be able to do so while preserving URLs and images, as most of the data I have is at least structured and able to be migrated from other Drupal sites.

Stay tuned for more!

Always getting X-Drupal-Cache: MISS? Check for messages

I spent about an hour yesterday debugging a Varnish page caching issue. I combed the site configuration and code for anything that might be setting cache to 0 (effectively disabling caching), I checked and re-checked the /admin/config/development/performance settings, verifying the 'Expiration of cached pages' (page_cache_maximum_age) had a non-zero value and that the 'Cache pages for anonymous users' checkbox was checked.

After scratching my head a while, I realized that the headers I was seeing when using curl --head [url] were specified as the defaults in drupal_page_header(), and were triggered any time there was a message displayed on the page (e.g. via drupal_set_message()):

X-Drupal-Cache: MISS
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
X-Content-Type-Options: nosniff

Pages

Subscribe to Jeff Geerling's Blog