Ben Lobaugh Online

I think, therefore I am. I am, therefore I sail

Looping stairs

How to fix a WordPress HTTPS redirect loop with an NGINX reverse proxy

If your WordPress site is set up to use HTTPS and a reverse proxy, such as an NGINX reverse proxy, is put in front of it you may wind up with an infinite redirect loop.

Following the redirect in dev tools, it looks like this is happening:
https://example.com -> https://example.com

A head scratcher for sure, but understanding what is going on behind the scenes reveals the issue and the solution together.

Here is what is actually happening:

  • Request is made to https://example.com
  • The reverse proxy catches the request and makes it’s own request to http://example.com. Take special note that the schema changed to http.
  • The WordPress site sees a request for http://example.com and says, “Hey, that’s not right, I am at https://example.com” and tells the browser to go there
  • Repeat indefinitely

You could change the site to support http to the exclusion of https, however that is hacky and anything wanting https will still work itself into an infinite redirect.

An easier solution is to trick WordPress into thinking the request is https enabled.

WordPress looks at a server variable when determining the status of https. Open your wp-config.php file and add the following just after the <?php tag:

if ( $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
    $_SERVER['HTTPS'] = 'on';
    $_SERVER['SERVER_PORT'] = 443;
}

And now your site will work as originally anticipated.

Dastardly isn’t it 😉

Photo by Dan Freeman on Unsplash

Broken glasses fixed for less than $5

How I fixed my expensive broken glasses for less than $5!

I had a difficult time finding sunglasses that fit well and are comfortable. As a sailor I am particularly picky about them as they need to stay firmly attached to my face in all sorts of conditions and also be comfortable to wear. When I find a pair I like I want them to last!

Recently I picked up a new pair cause the old one went swimming. Bummer. The new pair has been great except for one tiny little flaw….the top of the left frame broke when I took it off :(.

Dang. Two pairs down in two months. I do not want to shell out money for another expensive pair of glasses…

Enter Gorilla Glue.

Gorilla Glue

For less than a latte, less than $5 I was able to repair those glasses!

Clean the break. Dab some Gorilla Glue on. Wait for 15 minutes. Good as new!

I have been wearing the sunglasses with the fix on them for a couple weeks now and I am happy to report they are holding up nicely!

So next time your glasses, or anything plastic, breaks- head on over to Amazon and get yourself a tube of wonderful Gorilla Glue.

Seattle Duck Dodge Sailboat Race in a Minto on July 16, 2019

Raced a Minto dinghy in the Dock Dodge- near tragic ending!

Robert Dall sailing Martha the Minto - Seattle Duck Dodge Sailboat Race in a Minto on July 16, 2019My buddy Robert comes down from Canada every year to volunteer at the Footloose Disabled Sailing Blake Island trip. Along the way, Robert participates in the famous Seattle Duck Dodge sailboat race in my 9 foot Minto sailing dinghy. This year I was able to get out with him.

 

The theme of the race was pajamas. Robert dressed up, brought a Teddy Bear, and decorated the boat. We headed out from the northern side of Lake Union and hopped into the mix. There were well over a hundred boat- they all dwarfed us. Imagine a Pack of Saint Bernards running around your backyard and two Yorkies desperately trying not to get run over. We were the Yorkies.

The course was fairly long for the Mintos, and the wind lighter than I would have liked, but they made it around the course handily.

Before the course started we were milling around the start line and it was a bit dicey with the big boats trying to start. I took of up north and thought Robert had followed me. He had not. The boat Absolutely nearly crushed him while he was looking back at me and talking. After that he hung near the pin end of the starting line. I cruised up north in pursuit of the big boats. They headed there to make a long straight shot at the start. I figured I would do the same behind them, but on the downwind I found that the Minto kept up with several of them and I reached the start 8 minutes early. I started tacking east and west across the lake.

Robert Dall sailing with big boats - Seattle Duck Dodge Sailboat Race in a Minto on July 16, 2019

Our start came and I was ready to nail it, till a Catalina barged through. They had missed their start by 5 minutes and I guess figured running me down was ok. Missed the start horn by 30 seconds. Screamed down to the leeward pin and did pretty well. I waited near the pin for Robert and then we headed up to the windward mark near I-5. I passed a Catalina 22 and a Macgregor 26! Lost sight of Robert in the back of the fleet.

Catalina 22 I passed in a Minto! - Seattle Duck Dodge Sailboat Race in a Minto on July 16, 2019

Rounding the windward mark, We beamed over to the Aurora bridge mark. This was the biggest battle for me. Having such tiny sail area compared to everyone else, I really had to be on my games. Tactics were of high importance. I had to have clear air because every other boat out there could steal it and kill my momentum. I got a lot of praise for how well I sailed on this leg. Most of the big boats around me were on their second lap. Passed a Catalina 25.

Rounding that mark, I could not see Robert behind me anymore. He was struggling with the same stealing of air that I had and even more of the big boat fleet was around him! On this downwind run to the finish I had a couple beers thrown to me and passed a 30 footer, to finish second to last in my class, but only 5th from last overall. Not too bad for a light rowing dinghy with a sail.

Seattle Duck Dodge Sailboat Race in a Minto on July 16, 2019

I was very impressed at the performance of the Minto. She sailed well. 3 knots more wind would have helped a lot, but overall I was satisfied. The mental game was the most fun. When you have a lot of sail area it is easier to sail sloppy, when literally every boat can park you the game becomes much more strategic. I did well because I was trained and mentored well by Joe, and exceptional racer. Robert did ok for being in a little dinghy not meant for speed. He would have done better had he deployed the same tactics as myself. He did win a black duck though!

Overall it was a very fun night and I enjoyed it far more than I anticipated. I kinda want to do it again even!

Would I buy it again? Review of the Behringer U-PHORIA UMC202HD Audio Interface – Plus 2x bonus gear!

Back in the day Behringer was not known for particularly high-quality audio, so when I went to upgrade my audio interface you could say I was more than a bit skeptical of the Behringer U-PHORIA UMC202HD audio interface. To say that I have been pleasantly surprised would be mild. I am blown away by the clarity of the audio that comes out of it little unit.

Picked up this little unit for XX dollars on Amazon. This model has two inputs with double as XLR and TRS. The preamp’s are brilliant. There are two outputs for left and right on the back, and the headphone jack on the front with independent volume control can be used to monitor inputs, or the outputs.

Most of the time I am performing live with the U-PHORIA UMC202HD, and thanks to the flexibility of this unit I am able to bend and twist it in ways I never thought possible. Let me give you a brief overview of my setup.

Behringer U-PHORIA UMC202HD diagram

Typically, musicians run the sound out of their instrument to the sound board, and then the sound board returns their sounds in a monitor channel that allows them to create a mix of the band for monitoring. If you run a shared monitor send it can get dicey as musicians always want to hear themselves higher than the rest of the band. Having spent many years in this exact scenario, I came up with clever solutions to allow me to hear myself, which usually involved several pieces of equipment to create a mix between my instrument directly and the sound system monitor send. The U-PHORIA UMC202HD allows me to not only send a signal to the house, but also to mix and monitor the system at the same time. All from one box!

How do I do it?

The venue I play at runs mono- they get the left channel out from the U-PHORIA UMC202HD. The monitor send get plugging into input 2. In my software, Mainstage, I set up an audio track that uses input 2 as it’s source and pan that track all the way right. Then I simply plug some in-ear headphones into the front headphone jack and viola! Full independent control of my own volume versus the monitor mix. The output to the house is controlled by the main volume knob and the headphones are independently controlled with their own level.

Eventually I will write up a full tutorial on how I have this configured, but for now I will tell you that it is the best thing since sliced bread. I went from carrying a bag of equipment, to a laptop and the audio interface. Gigging has been greatly simplified.

But Ben, how does it SOUND?

Simply put, it sounds like a device many times its cost. The clarity is astounding! Sound comes out rich and full, faithfully replicating whatever I throw at it. And the noise when nothing is playing is simply non-existent. My venue has terrible ground loop issues that cause major hum. My prior setup always had issues, bad enough that I put a sound gate on the end of the chain, and so did the sound board. The U-PHORIA UMC202HD is completely silent! Even with the volume cranked there is no noise in the system. It also eliminated several potential ground loop issues since it is powered from the laptop itself.

I prefer Mainstage for….pretty much everything. It has a great set of preset sounds and it is super easy to create your own. The U-PHORIA UMC202HD integrates seamlessly. Just plug it in and the inputs and outputs show up right away. The input volume knobs on the U-PHORIA UMC202HD help regulate the incoming monitor volume, and the selector buttons let me bump the signal up or down, depending on what is coming from the house.

Would I buy it again?

In a heartbeat! This is definitely a device I recommend to anyone needing a kick-butt audio interface and is on a budget. In fact, there are models with more inputs and I am contemplating getting one and using it to manage all the devices and audio sources in my office!

Final conclusion

Do not let the low price fool you, the Behringer U-PHORIA UMC202HD is a great piece of hardware. It allowed me to replace at least 5 pieces of equipment! I would definitely buy it again and heartily recommend it to all you readers.

Bonus #1 – Make speaker level sends safe!

Running a speaker level, or amped, send into the U-PHORIA UMC202HD could be disastrous for both the unit and the computer connected to it! To get around that I carry a Rolls PM52 Headphone Tap. It takes in a speaker level send and gives you a knob to control its output level, making it perfectly safe for headphones, or the audio interface.

Bonus #2 – Direct Box for interfacing the sound system

Most sound systems want you to convert your signal to XLR for input to the sound system. The Radial Pro line of direct boxes cannot be beat! They will send a clean smooth sound to the system that is as close to what is in your ears as it gets. The cases are also a highly durable metal.

iMac on a desk

How to fix missing Calibri and Cambria fonts on Mac (Bonus: Segoe UI)

If you open Microsoft formatted documents on your Mac like I do then you have probably run across the annoying message saying the Calibri or  Cambria font is missing.

For years I have ignored this as an annoyance, but today I decided to do something about it. Turns out there is a very easy fix!

Richard Taylor of RMTWeb became fed up like me and put together a package of fonts to restore Calibri and Cambria fonts on the Mac.

Getting the fonts running is trivial:

That’s it.

Really.

You will no longer get that annoying message about missing fonts!

Thanks to Richard for providing this resource! His original instructions can be found at https://www.rmtweb.co.uk/calibri-and-cambria-fonts-for-mac

Bonus: Segoe UI Font

After posting the original fonts I ran across an issue with Segoe UI fonts missing. Microsoft provides a download for them at Segoe UI and Fabric MDL2 external icon font. The install instructions are the same as above!

Photo by Patrick Ward on Unsplash

Page 1 of 160