Nginx proxy with Ansible and letsencrypt for multiple domains

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

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

Using: https://github.com/thefinn93/ansible-letsencrypt/

proxy.yml:

- hosts: proxy
  vars:
    letsencrypt_webroot_path: /var/www/letsencrypt/
    letsencrypt_email: [email protected]
    letsencrypt_cert_domains:
      - site.com
      - www.site.com
      - othersite.org
    letsencrypt_renewal_command_args: '--renew-hook "systemctl restart nginx"'
  roles ...
Continue reading

Dumping PHP headers

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

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 */
<?php
     while (list($var,$value) = each ($_SERVER)) {
            echo ...
Continue reading

Multiple Ansible versions on Mac

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

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 ...
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:https://stackoverflow.com/questions/2395089/how-do-i-find-out-version-of-currently-running-solr

Continue reading

Solr issues with Drupal

Posted on Tue 24 February 2015 in SysAdmin • Tagged with drupal, search, 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