Posts

Showing posts from 2019

ISPConfig: Mass Email User Creation

Preparing for migration from an old email system (±15 years old FreeBSD...) to the latest ISPConfig. One of the steps is creating email users. ISPConfig has minimalist documentation and few examples.

How to forward one or a few VLANs to a KVM virtual machine

Next step using Open vSwitch (OVS) network configuration ( How to forward all VLANs to a KVM virtual machine using Open vSwitch (OVS) ) to provide only one VLAN.

How to forward all VLANs to a KVM virtual machine using Open vSwitch (OVS)

By default, documentation suggests sending all traffic via OVS. This is risky, because OVS is an independent service that can stop, restart, or fail. My approach separates management and production networks for reliability.

GitLab Runner: Cache adapter could not be initialized: missing S3 configuration

Sometimes GitLab Runner cache stops working after upgrading. Example here with gitlab-runner 12.0.1 .

MySQL Export: One Table per File

Way to save a gzipped SQL dump of each table individually. Sometimes it’s useful to have separate table backups.

Magic with nginx geo and autoindex on/off

Image
Long story short: Nginx does not support .htaccess , which can be a problem when you want to restrict autoindex to specific IPs.

/var/run/mysqld not present after reboot

Symptoms: MySQL starts correctly after installation, but fails to start after the first reboot because it cannot create the PID/socket in /var/run/mysqld .

Minimalist nginx vhost template example

Minimal Nginx template for HTTPS with HTTP → HTTPS and www → non-www redirects. No need for separate 80 and 443 vhosts if you only use 443 for traffic.

High Availability Redis with Automatic Failover

Image
Redis is a powerful tool to store key-value data in various formats. Here’s a simple way to create failover replication. Sometimes people call this a Redis cluster, but in reality it’s just a few servers (preferably 3 for Sentinel quorum) with one master and multiple slaves in different configurations (slave of slave, slave by priority, local slave, etc.).

User-friendly Bash script template

Sometimes you need a user-friendly interface for scripts. Using raw ARG0, ARG1… is messy. Here’s a clean example of parsing arguments like -h or -a=one in Bash.

Fail python-pip after upgrade on Debian 8 and 9

Sometimes after running pip install --upgrade pip , pip fails with the error ImportError: cannot import name main . Here’s the simplest way to fix it.

How to Safely Manage iptables with Docker Compose

How to protect iptables when using docker-compose . By default, Docker dynamically modifies iptables rules, which prevents normal firewall management. Many guides suggest saving Docker rules and restoring them later — I don't think this is a good approach. If Docker cannot handle firewall tasks properly, let's free it from this responsibility. See also docker-compose demonization with systemd .