Fix Virtualmin Proxy with Let's Encrypt

This is a minor inconvenience that I’ve dealt with for far too long. When using Virtualmin as a reverse proxy, it doesn’t handle Let’s Encrypt verification records correctly and forwards them to the upstream service. In my case, this would cause certificates to issue correctly initially, but then fail to renew after three months is up. Since every request that hits the server was getting sent to the upstream server (including any requests to ....

June 14, 2021

Backup Google Photos (Part 2)

In Part One we looked at how to download our photos from Google Photos to a local drive. But now we’ll look at how to archive them into human readable folders that can be included in daily snapshot backups. Our Problem Now we have all our photos downloaded, but I really wanted things to live on my NAS with the rest of my important files. This would also let me potentially delete photos from Google Photos but keep things locally....

April 15, 2021

Backup Google Photos (Part 1)

One service that I’ve come to rely on is Google Photos. For the last number of years, I’ve had photos on my phone (which is now my primary camera for trips) automatically backed up and categorized. It’s a slick service, but I feel most comfortable having local copies of photos and keep them in a snapshot backup system. Why I Did This Google Photos is great, and I don’t really have any issues with the service or its availability....

April 1, 2021

Condensed PHPMyAdmin Configuration

This is something that bothered me when adding more than one server to PHPMyAdmin. The default configuration is very verbose, and largely isn’t needed for simple use cases. In my case, I boiled down the config options I use most frequently, and changed the format to be more inline. The format doesn’t look too good on the site, but it is pretty clean once in a wider editor. $cfg['Servers'] = [ 1 => [ 'host' => 'xxx', // MySQL hostname or IP address 'port' => '', // MySQL port - leave blank for default port 'socket' => '', // Path to the socket - leave blank for default socket 'ssl' => true, // Use SSL for connecting to MySQL server?...

December 2, 2019 · Andrew

Securing Apache Sites With Saml

So I recently have fallen in love with single sign on. I really like centralized user management, and being able to adapt it into many different application is really sweet. Plus, it makes compliance people happy! One feature I like is the ability to secure arbitrary Apache websites with it using a plugin called Mellon. Basically this acts like the native apache authentication, but rather than present a window for a username and password, it redirects you to your SSO provider to login....

October 25, 2019 · Andrew

Using Foundation for Emails (Inky) in a Php Application

One framework that I instantly fell in love with was Inky. Having built a number of emails using pure HTML, having the shorthand syntax was amazing. Coupling it with the inliner and CSS in Foundation for Emails, it’s dead simple to write a good looking email. Just one problem: Foundation for Emails assumes you’re either writing emails as standalone units, or integrated into a Node.JS application. What are you to do if you’re, say, running a PHP Symfony application?...

September 13, 2019 · Andrew

Smart Failover With Redis Sentinel and Keepalived

Through some Google-fu and some other great tutorials, I’ve successfully setup a groups of Redis machines with automatic failover detection via keepalived and sentinel. This sounds mundane, but lets you setup another layer of protection for your Redis cluster without lots of extra configuration. Background – Redis Sentinel and Keepalived Redis Sentinel makes it pretty easy to setup a group of replicated Redis machines and elect new master nodes when others are offline....

December 18, 2017

Autowired Traits in Symfony

This is something that I think is pretty slick in Symfony. With 3.3, Symfony introduced the idea of autowired services. Basically, you just put a type hint for what you need and the container injects the correct service as if by magic. You can take advantage of this in some more unusual places that aren’t immediately apparent after reading the documentation. In my case, I had a controller trait that provides some common functions but it needs to interface with some services to do this....

October 7, 2017