Author name: Dan Langille

I've been playing with computers since I read an Elementary Electronics magazine way back in the 1970s. I started contributing to open source projects in 1998. After that, I gradually moved from being a software developer to being a systems administrator.

Creating a FreeBSD virtual machine using bhyve-vm

I had a need for FreeBSD-16.0-CURRENT. I’m already using sysutils/vm-bhyve (Management system for bhyve virtual machines, relevant blog post). These steps really are very short notes. In this post: FreeBSD 15.0 (the host system) vm-bhyve-1.7.0_1 FreeBSD 16.0-CURRENT The very short notes The VMs I had before I started: [23:36 r730-01 dvl /data04/images/FreeBSD] % sudo vm list NAME DATASTORE LOADER CPU MEMORY VNC AUTO STATE freebsd-test default bhyveload 1 256M – No Stopped hass […]

Creating a FreeBSD virtual machine using bhyve-vm Read More »

maintenance script changes

After I wrote the script to put up a maintenance page for my websites, I came up with two more things to display on the page: Timestamp for start of maintenance Reason for maintenance In this post: FreeBSD 15.0 The new script The new script is invoked like this: [14:11 r720-02-proxy01 dvl ~] % ~/bin/offline dev.freshports.org "$(date -R -v +2H)" "Offline for database update" <html> <head> <title>Error 503 Service Unavailable</title> <style> <style> body

maintenance script changes Read More »

Hacking openvpn to use syslog with something other than facility = daemon

I don’t see a way to specify the syslog facility for OpenVPN – perhaps I can change that in the code. It would allow logging openvpn to a specific file and being able to rotate that log file. –log-append does not allow for log rotation. In this post: FreeBSD 15.0 OpenVPN 2.6.19 Signals sent to OpenVPN do not affect logging. Thus, I must rely upon syslog and newsyslog to achieve log rotation. At

Hacking openvpn to use syslog with something other than facility = daemon Read More »

Script to generate that maintenance.html file for taking my websites into maintenance mode

In a recent blog post, I showed you how I was taking my websites into maintenance mode. Shortly afterwards, I wrote about how using $server_name can have odd consequences. Today, I’m writing about the script I just created which will create those maintenance.html files. In this post: FreeBSD 15.0 nginx 1.28.2 bourne shell The script This is the script: [12:17 r720-02-proxy01 dvl /usr/local/www/offline] % cat ~/bin/offline #!/bin/sh # Usage: ~/bin/offline foo.bar "$(date -R

Script to generate that maintenance.html file for taking my websites into maintenance mode Read More »

Using variable names in nginx declarations has a price: e.g. ssl_certificate /usr/local/etc/ssl/${server_name}.fullchain.cer;

I recently implemented a fun (to me) and easy solution for taking my web proxy websites offline, either one-by-one, or all-at-once. Today’s post talks about some of the repercussions which followed one-new-thing I tried. In this post: FreeBSD 15.0 nginx 1.28.2 I jump between testing the test host and stage host; both had similar issues. The relevant changes This is the type of change I started to do. Instead of putting the hostname

Using variable names in nginx declarations has a price: e.g. ssl_certificate /usr/local/etc/ssl/${server_name}.fullchain.cer; Read More »

ddclient 4 changes

After a 4-hour power outage today (crews were working on the power lines), my home IP address changed, perhaps for the first time in over a year. I also noticed ddclient was no longer installed on my host. This blog post outlines changes from the original article. In this post: I’m mostly documenting my local changes based on the previous post. FreeBSD 15.0 ddclient-4.0.0 Updates to the Ansible playbook for ddclient: https://github.com/dlangille/ddclient/ forked

ddclient 4 changes Read More »

Taking your nginx website offline for maintenance? I have an idea.

From time to time, I need to take an nginx webserver or website offline for whatever reason. I might be migrating the database behind the website, the hardware might be powered off for work, etc. In my case, these points might help you follow along with what I’m doing: FreeBSD 15 nginx-1.28.2 there is an nginx proxy in front of the website – this nginx instance has no real content; it uses proxy_pass

Taking your nginx website offline for maintenance? I have an idea. Read More »

Moving MySQL databases into MariaDB

I had a problem with MySQL 8.4 recently. Eventually I gave up and resorted to moving to MariaDB. Switching applications because I hit a problem isn’t something I usually do lightly. Overview Most of the work won’t be shown here. However, this is an overview: Created a new jail on the host: [12:09 zuul dvl ~] % sudo mkjail create -j mariadb01 -a amd64 -v 15.0-RELEASE Add new DNS entries for that jail

Moving MySQL databases into MariaDB Read More »

nagios03: drive recovery

After zpool upgrade blocked by gpart: /dev/da0p1: not enough space, I’ve decided to create a new Azure VM, snapshot the now-faulty-drive, attach it to the host, and start zfs replication to copy the data to new drive. Or something like that. The existing drive needs to be imported with a checkpoint rollback, then copied to a drive with different partition sizes. Here’s the new host: dvl@nagios03-recovery:~ $ gpart show => 34 62984125 da0

nagios03: drive recovery Read More »

Scroll to Top