1. 2018

    Wildcard certificate from Let’s Encrypt with CloudFlare DNS

    If you’re using CloudFlare to host your DNS, there is a plugin for the official Let’s Encrypt client Certbot you can use to easily acquire and renew wildcard certificates from Let’s Encrypt.

  2. 2018

    Automate the upgrade of your DigitalOcean droplets

    Recently DigitalOcean released [new pricing plans](https://blog.digitalocean.com/new-droplet-plans/) where they basically doubled the RAM for the same price of the old plans. But to get the benefits for your existing droplets, you have to upgrade all of your existing droplets in a process that involves shutting them down, selecting the new plan, waiting for the upgrade to happen and power on the droplets again. I have tens of droplets and had no intention of doing this manually, so I wrote a script to use the DigitalOcean API to automate a mass-upgrade of all droplets.

  3. 2016

    How to do an Nginx redirect

    Nginx is an extremely efficient and quite flexible web server. When you want to do a redirect in Nginx, you have a few options to select from, so you can choose the one that suits you best to do an Nginx redirect.

  4. 2015

    Restrict allowed HTTP methods in Nginx

    Security vulnerabilities are often exploits of software that fails when trying to deal with unexpected input. Other times they are exploits of a misconfiguration or a service that unintentionally was open to the public. For the above reasons, we should limit as much as possible what services are exposed to the public and limit as much as possible what they do and accept from the visitors. To follow those security principles, we should only allow the HTTP methods for which we, in fact, provide services. Under all normal circumstances, that would be the methods `GET`, `POST` and `HEAD`.

  5. 2015

    Exclude certain requests from the Nginx access log

    Logs are nice and all that, but sometimes certain entries are there just to fill up the logs or are cluttering them. Here’s a few ways to exclude requests – by URL or visitor IP – from the Nginx access log.

  6. 2015

    Configure your local Postfix to relay through a transactional email service

    Using Postfix with specialized, transactional email services like SendGrid or Mandrill is excellent for not only for optimizing email deliverability, but they usually also offer some nice features.

  7. 2015

    Running PHP7-FPM Nightly Build on Ubuntu 14.04

    As I’m writing this, the calendar shows April 14 2015. According to the [PHP 7.0 timeline](https://wiki.php.net/rfc/php7timeline), it has a projected release date of November 2015. But if you want to try it out (to check out the speed), you can already do so.

  8. 2014

    Running HHVM with fallback to PHP-FPM

    HHVM can really speed up your PHP-based web site. Most reports are somewhere in the range of 2–4x faster. Unfortunately, HHVM isn’t very stable and will suddenly die, just of the blue, from time to another. Fortunately, if you’re running Nginx it’s really easy to set up PHP-FPM as a fallback.

  9. 2014

    Using fail2ban from behind a Rackspace Cloud LoadBalancer

    If your fail2ban is on a host behind a Rackspace Cloud LoadBalancer, you’ll want to block the offending IP addresses directly in your LoadBalancer. If your LB is acting as a reverse proxy, you’ll HAVE to block in the LB, but it is also nice to protect all other nodes behind the LB and offload the lifting.