Nginx proxy with Ansible and letsencrypt for multiple domains

Posted on Thu 25 August 2016 in SysAdmin • Tagged with nginx, ansible, letsencrypt

Say you're running an nginx proxy and need to set up multiple domains with different backends.



- hosts: proxy
    letsencrypt_webroot_path: /var/www/letsencrypt/
    letsencrypt_renewal_command_args: '--renew-hook "systemctl restart nginx"'
    - { role …

Continue reading

Dumping PHP headers

Posted on Mon 07 March 2016 in SysAdmin • Tagged with php, debugging

I read this somewhere and want to keep it around.

Sometimes I need to debug HTTPS/header issues in a load balanced environment.

Here's how to dump all the headers in PHP:

/* {DocumentRoot}/headers.php
Show all values defined on $_SERVER */
     while (list($var,$value) = each ($_SERVER)) {
            echo "$var …

Continue reading

Multiple Ansible versions on Mac

Posted on Thu 03 March 2016 in SysAdmin • Tagged with ansible, debugging

I ran into some regression bugs with the latest version of Ansible and wanted to test to confirm a few things before posting bug reports. As I run MacOS at work, Ansible is installed from Brew. If you're lucky, you might still have your old versions around:

$ ls /usr/local …

Continue reading

Microphone feedback loop with PulseAudio

Posted on Tue 06 October 2015 in Linux • Tagged with alsa, archlinux, pulseaudio

Moving to PulseAudio is pretty painless. Just need to install the package and edit /etc/pulse/client.conf to have:

autospawn = yes

One issue I did have was I kept hearing my microphone input in my headphones using a USB headset.
Fixing this was quite simple - in alsamixer, use F6 …

Continue reading

Finding out your Solr version

Posted on Thu 01 October 2015 in SysAdmin • Tagged with solr, tomcat

I can never remember how to do this without the GUI so here is the quick command to detect the Solr version you're currently running:

wget -q -O- localhost:8080/solr/admin/registry.jsp | grep -E "spec-version|impl-version"

A helpful StackOverflow link:

Solr issues with Drupal

Posted on Tue 24 February 2015 in SysAdmin • Tagged with drupal, smartos, solr, tomcat, truss

Broken search

One of our clients have been having issue with the search function on their Drupal site. This full text search was powered by Solr behind the scenes. The issue only only ever occurred when the user was logged in so it was never flagged up to us.

Recently …

Continue reading

SMTP authentication in Exim

Posted on Wed 28 January 2015 in Linux • Tagged with exim

No more Google SMTP for your aliases

Since August last year, Google have grandfathered a feature in GMail that allows you to create aliases in your account and send emails as those aliases from their SMTP servers:

For any new aliases …

Continue reading

Updating and resetting Raritan Dominion PX PDUs

Posted on Tue 29 May 2012 in SysAdmin • Tagged with hardware

I just had the pleasure of resetting some PDUs to factory defaults today. The models in question were Raritan Dominion PX20 (DPXR20A-16/32). After a mostly fruitless search for 'raritan px reset to factory default' and 'raritan px restore to factory default', I have managed to dig out a way …

Continue reading

PHP errors not displaying in IIS

Posted on Fri 18 May 2012 in SysAdmin • Tagged with iis, php

A customer called in today saying that their site is not working after re-pointing the DNS. No changes have been made in a week and it was working fine before. Typical.

So I turned on Firebug and notice it's a 500 error. Logged into the server and saw it's a …

Continue reading

Modding the Filco Majestouch Tenkeyless

Posted on Wed 16 May 2012 in Misc • Tagged with mechanicalkeyboards

I've recently made an investment and purchased a Filco Majestouch 2 Tenkeyless, blue switch edition. It was a toss-up between that and the HappyHacker and I decided I like the arrow keys too much to let go. KeyboardCo have exclusive distribution rights here in the UK so I got mine …

Continue reading