Adding Nginx in Front of WordPress

There are a few drawbacks to the 1-Click install. I’m planning to tinker with something really cool down the road to fix one of those problems (I know the future again). Luckily, I’m going to address my first initial concern in this post. What is that concern you ask? Protecting my WordPress admin of course! Sure, there are a number of WordPress vulnerabilities roaming around and talks of zero days and the sort. I make life easier on any attacker if I just leave my WordPress admin open to anyone. In this post, we look at taking my custom nginx and deploying it in front of my WordPress site to enforce IP access control to the admin page. ...

January 7, 2021 · 8 min · Scott

Testing Out the Digital Ocean Container Registry

Disclosure: I have included some affiliate / referral links in this post. There’s no cost to you for accessing these links but I do indeed receive some incentive for it if you buy through them. Building the Custom Nginx This part was pretty easy. I simply created a Dockerfile for the build. FROM ubuntu ENV DEBIAN_FRONTEND noninteractive MAINTAINER Scott Algatt RUN apt-get update \ && apt-get install -y libjansson-dev libcurl4-openssl-dev libapr1-dev libaprutil1-dev libssl-dev build-essential devscripts libtool m4 automake pkg-config libpcre3-dev zlib1g-dev\ && apt -y upgrade \ && apt -y autoremove \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \ && curl -o /tmp/nginx.tgz http://nginx.org/download/nginx-1.18.0.tar.gz WORKDIR /tmp RUN tar zxf nginx.tgz \ && cd nginx-1.18.0 \ && ./configure --with-http_realip_module\ && make \ && make install EXPOSE 80 CMD ["/usr/local/nginx/sbin/nginx"] As you can see from the Dockerfile, this is a really super simple build. It is also not very custom aside from my compile command where I’ve added –with-http_realip_module. This little addition is something that I will use later in a future post (I know everything will be in the future) but you can see what it does by visiting the nginx documentation. Anyhow, there you go. Aside from the configure command, I’m just setting up ubuntu to compile code and I download nginx and compile it. Then expose port 80 and run nginx. ...

December 30, 2020 · 3 min · Scott

Making the Lights Dance

My previous post, Making the Little Lights Twinkle, covered my coding of the NodeJS server that could take simply relay numbers and command (on|off) and put them to use. Now that I have a server/service up and running, it was time for me to be able to control the lights. I removed my Orchestra of Lights and put my new Raspberry Pi hardware device in its place. The only downside is that my setup has 8 outlets and the Orchestra of Lights only had 6. As I built out some of my light sequences, I noticed there’s a delay due to relays 7 and 8 being triggered but nothing being connected to them. Maybe that’s something I can do for next year. I’ll plan for 8 lighting areas instead of just 6. ...

December 23, 2020 · 5 min · Scott

Making the Little Lights Twinkle

My previous post, Building the RaspberryPi Christmas Light Box, explained at a hight level building out the hardware. That step was a little scary than I think it should be but it all worked out just fine in the end. Now that I had everything put together and powered on, I was stuck here: pi@raspberrypi:~ $ What are the next steps? I’ve got this box all wired up and ready to go but now I’m just sitting at a prompt waiting. As I mentioned before, I broke this down into a few parts to make my life easier and not get overwhelmed. After doing some more and more reading, I figured I had two options. I could program everything in Python or I could program everything in NodeJS. ...

December 17, 2020 · 8 min · Scott

Building the RaspberryPi Christmas Light Box

Disclosure: I have included some affiliate / referral links in this post. There’s no cost to you for accessing these links but I do indeed receive some incentive for it if you buy through them. Let’s Cover Some Background Here I have always enjoyed Christmas lights. For quite some time, I was very intrigued at the notion of putting the lights to music or at least making them dance in motion. About 3 years ago, my wife and I bought a string of lights that had a mind of their own. It was neat to watch it random go through the different patterns of blinking, dancing, and chasing. Last year was the year that we got the really neat ones. They were icicles that changed colors AND danced and chased and more. ...

December 9, 2020 · 5 min · Scott