Jenkins2 on AWS - make a redirect from http to https

You think it would be simple to set up a http redirect on an AWS Marketplace setup for Jenkins2, but it isn't. As it turns out, the instructions from AWS itself are wrong, and so are the instructions from Bitnami!

Here is the redirect that will work. This should be valid for most apache setups on AWS, and then I will show you how to apply it to a Jenkins2 server.

Add this to your apache conf file:

RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} ^http$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Then restart apache and you should have no problem after that.

To do this for Bitnami's implementation of Jenkins2 on AWS (this is the AWS Marketplace image), do the following:

  1. Add the above change to the top of: /opt/bitnami/apps/jenkins/conf/httpd-prefix.conf
  2. Restart apache:
    sudo /opt/bitnami/ restart apache


Gotta catch em all ...

How to delete all broken symbolic links with a single line

If you are in the directory:

sudo find -L . -type l -delete

Careful! This will follow good symbolic links and delete bad sym links recursively!

If you want to list them instead, but not delete:

sudo find -L path-to-directory -type l 

Java won't work on Yosemite? Of course not.

Yet another reason to be grumpy about the upgrade to Yosemite.

I downloaded and installed jmeter to do some apache profiling/benchmarking, but it wouldn't run, complaining that there was no java. When you try to run a java application, you may get an error message that looks something like this:

To open "application" you need to install the legacy Java SE 6 runtime.

This is because jmeter requires the legacy Java 6 provided by Apple and you will need to download it. But it's simple enoug.

You can get the download from here:

el Capitan makes me go full screen! STOP IT!

Ever since I upgraded to OS X el Capitan (I'm behind the curve, I acknowledge), the little green button in the upper left-hand corner of all my apps and windows now does unexpected tomfoolery. Instead of maximizing or re-sizing the windows, like it did in all previous versions of OS X, the button takes into full screen mode. Suddenly everything that was maximized became uber-maximized, and it annoyed the bejeezus out of me.

Here's the fix. If you want to call it that.

Old school is better, in my opinion: just Option-Click on the green button. BAM, you're back to the comfortable old days, when green buttons just meant maximize.