Karel Bemelmans' BLOG

Because sharing is caring.

05 Aug 2019

Running Hugo on AWS using AWS Amplify

After running my Hugo blog on AWS S3 + CloudFront for a few years I’ve dediced to move it to AWS Amplify, followin...
30 Dec 2018

Nginx-plus as a reverse proxy for Atlassian JIRA Data Center edition

Nginx-plus as a reverse proxy for Atlassian JIRA Data Center edition
25 Nov 2018

Another year is almost gone.. this was my 2018

I haven't posted a single blog post yet this year, so it's time for a catch-up post.
15 Oct 2017

Docker nginx container with GeoIp database

This is a Docker nginx container that includes the MaxMind GeoIP Country database. It injects the X-Origin-Country-Code and X-Origin-Country-Name headers into http requests to the backend with the country code of the requester.
22 Aug 2017

Docker PHP container with New Relic

I created a small example Docker container that runs PHP with the New Relic agent installed. The New Relic agent on the Docker host cannot monitor things inside the containers, so we need to install the agent inside each Docker container.
05 Aug 2017

Common misconceptions about the public cloud

When I talk to people in other companies I still hear a lot of misconceptions about public clouds works and how you can monitor and control costs. I will try to get rid of the biggest ones in this blog post.
12 Feb 2017

My favorite developer tools for OSX

Having the right tools on your computer is the key to work fast and efficient, without having to waste much time on repetitive and boring actions. Here's a list of the current tools I use on my Macbook.
01 Jan 2017

Deploying a Hugo website to Amazon S3 using AWS CodeBuild

A month ago I blogged about using Bitbucket Pipelines as a deployment tool to deploy my Hugo website to AWS S3. It was a...
22 Dec 2016

Advanced networking on Amazon Web Services video

Watching talks like this one from AWS reInvent 2016 makes me an even bigger fan of public clouds than I already am. It s...
20 Nov 2016

CloudFormation template for automated EBS volume backups using AWS Lambda and CloudWatch

This is a CloudFormation template that creates a small stack that uses AWS Lambda and CloudWatch to take daily backups of EBS volumes and deletes the snapshots when their retention period has been reached.
04 Nov 2016

EC2 UserData script that waits for volumes to be properly attached before proceeding

This blog post shows an example UserData script that can be used to wait for volumes to be properly attached.
13 Oct 2016

Deploying a Hugo website to Amazon S3 using Bitbucket Pipelines

This blog post shows you how I use Atlassian Bitbucket Pipelines to automatically deploy my blog to AWS S3.
08 Oct 2016

CloudFormation YAML support

CloudFormation recently added support for YAML, so I've updated my Drupal 7 stack with a YAML version.
11 Jul 2016

Running Drupal 7 on AWS with EFS

In a previous post I created a CloudFormation stack that creates a Multi-AZ Drupal 7 server setup using MySQL, ElastiCache and S3. In this post I will replace S3 with the newly released AWS Elastic File System (EFS).
05 Jul 2016

Docker cleanup commands

Running Docker containers also includes a little housekeeping to keep your Docker hosts running optimal and not wasting resources. This blog post provides an overview of which commands you can use.
13 Jun 2016

Running Drupal 7 on AWS - part 2

This is part 2 of Running Drupal 7 on AWS. While part 1 focused on the how and why of the setup, this blog post contains CloudFormation code that will create a full software stack on AWS, configured to run Drupal 7.
10 Jun 2016

Running Drupal 7 on AWS - part 1

The last 5 months I've been doing a lot of work on Amazon Web Services (AWS) for my new job as a Cloud Architect. Learning how to build applications that take fully advantage of The Cloud has made me very anxious to redo some of my previous projects and rebuild them for AWS. In this blog post I'll start of with the best way to run a Drupal 7 website on AWS.
09 Jun 2016

Getting started with Amazon Web Services (AWS)

Amazon Web Services (AWS) is a huge open cloud platform with lots of services you can use on an as-you-want basis. Getting started is often difficult as there are some many resources available. In this post I'll give you an overview of where you should start.
11 Feb 2016

A Docker Drupal 8 deployment container

I wrote a small example project that creates a deployable Drupal 8 container by copying the entire Drupal codebase into the Docker image.
01 Jan 2016

Datadog php-fpm monitoring via nginx

Datadog php-fpm monitoring via nginx
19 Oct 2015

Useful bash one liners

This is a list of some bash one liners I use on a daily basis during development and problem debugging. I made this list as a "you might not know this one yet" and will continue to update it every now and then.
14 Oct 2015

Automated Drupal 7 deployments with Atlassian Bamboo

In this blog post I write about how you can use Atlassian Bamboo to automatically deploy a Drupal 7 website. It covers creating a build plan, creating a deployment plan, setting up deployment environments and how these 3 work together to create an automatic Drupal deployment system.
08 Oct 2015

A better alternative for using phpMyAdmin

Almost every week I run into atleast one production site that has a phpMyAdmin installed in the document root of the site, or as a separate vhost on the server. While this used to be pretty required in 2005 to make changes to the database in production, now in 2015 we have better ways to do that.
24 Sep 2015

Separating your project and environment settings in Drupal 7

For Drupal 7 sites it’s best that you split up your settings.php in 2 different files: settings.php and env.settin...
08 Sep 2015

Puphpet - PHP Vagrant development images made easy

Update 2016/07/06: You should probably not be using Vagrant (and Puphpet) anymore now that we live in the wonderful worl...
20 Aug 2015

Weird errors with Drupal themes containing a node_modules folder

Using npm to install packages inside a Drupal theme or module folder can sometimes break your site. This blog post explains why this is happening.
18 Aug 2015

Running rsync over ssh on a non-standard port

It seems a lot of people don’t know how to rsync over ssh when the server is running on another port than 22. Here...
03 Aug 2015

Running individual cron commands in Drupal 7

It took me some searching, but it seems this is the best way to run a single cron command, in this case the scheduler cr...
20 Jul 2015

Integrity constraint violations on the Drupal 7 block table

One of our Drupal 7 sites was giving a lot of white pages of death. Looking through the Drupal logs we saw a lot of integrity constraint violations and decided to dive deeper in the code. It turns out it was quite a complex Drupal core problem but we managed to find a fix for it.
13 Jul 2015

Reverse proxy configuration for Apache or nginx with varnish

If you want to have the correct ip address in your Apache or nginx logs when running a Drupal 7 website with a varnish cache, you need to add some configuration to your server. This post shows you what to do.
25 Jun 2015

Performance debugging basics: the MySQL slow log

In this blog post I'll show you how simple and usefull the MySQL slow query log can be to find performance problems in a Drupal 7 site running a complex import task as a drush batch process.
24 Jun 2015

Apache, Varnish, mod_deflate and 503 errors

About 90% of the unexplainable Varnish 503 errors I've seen the last year have been caused by Apache having mod_deflate enabled while there's a varnish cache in front of it.
03 Jun 2015

One hour of New Relic to solve a critical performance issue

This post shows an example how easy it was to find a performance problem on a production website using New Relic's APM.
24 May 2015

How to add useful logging to your Drupal 7 code

In this blog post I will give you an overview how you should add proper logging to your Drupal 7 code.
22 May 2015

Netiquette: email signature separator

It’s time for another netiquette rant: There are way too many people not using the double dash marker as the first...
17 May 2015

Debugging Drupal 7 development

There are a lot of ways to debug your Drupal code while developing or when it’s running on production. In this blo...
13 May 2015

Enforce SSL for an Apache vhost

Here’s a proper way to enforce SSL with the apache2 web server, without hardcoding the ServerName in the config. Y...
12 May 2015

Drupal watchdog logging: dblog vs syslog

Sometimes logging events to your Drupal database is not the best way to go and can be quite a performance killer. This is when you want to start using a syslog server.
08 May 2015

Configure Telenet ipv6 on pfSense 2.2.x

It took me some time to figure this out, but thanks to @iworx his input I managed to get ipv6 up and running with my Tel...
28 Apr 2015

Reverse proxy configuration for Drupal 7 sites

When you are using a Drupal 7 website setup with an extra caching server (like varnish), it's very important that you configure you Drupal settings.php the right way. This blog post show you how.
23 Mar 2015

Elasticsearch backup script with snapshot rotation

Elasticsearch 1.4 has an easy way to make backups of an index: snapshot and restore. If you use the filesystem way, you can just make a snapshot, rsync/scp/NFS export the files to another host and restore them from those files.
18 Mar 2015

The best way to run a Drupal 7 cron via drush

This blog post shows you the the best way to run your Drupal 7 drush cron command from crontab.
16 Mar 2015

Mounting a remote filesystem using sshfs

There's an easy way to mount a remote directory or filesystem over ssh - sshfs.
16 Mar 2015

A safer nginx virtual host config for Symfony2 sites

As Symonfy redirects all PHP requests to app.php, it's a safe solution to only use app.php as your nginx fastcgi_pass script. This blog post show you a simple config example.