Follow @endyourif rss Facebook LinkedIn

Setting up SSL with nginx including redirects from non HTTPS traffic

Published on Feb 6, 2019

In an attempt to improve security and privacy on the Internet, Google is encouraging websites to secure their site with an SSL certificate, aka https:// instead of http://
As you may have noticed, I just officially updated my domain to be under SSL. As I described in my It's LEMP not LAMP post that I use nginx for my web server. I thought I would share how easily I was able to convert my website to use SSL with nginx.

Before you begin, be sure you have already created your SSL certificate and have your certificate and private key files ready and uploaded to your server (I got my SSL cert free with my domain registration at Porkbun).

Node.js Versus Nginx: Bare Bones Test

Published on Dec 4, 2012

This is a quick follow up to yesterday’s post on Node.js Versus Apache2: Bare Bones Test where I performed a straight HTML test of Node.js versus Apache.  With my recent switch to Nginx, I thought it prudent to perform this exact same test swapping out Apache for Nginx.  The results are much more interesting to yesterday’s since there is no total destruction (sorry for the spoiler if you didn’t read yesterday’s article).

Update: It Actually Should Be LEPP Not LEMP or LAMP!

Published on Sep 14, 2012

In several recent posts: It’s LEMP not LAMP! and Amazon EC2 Shoutout! I've discussed how I switched from a shared hosting account with GoDaddy to a dedicated Micro instance with Amazon.  At the same time I decided to go out and try nginx (pronounced Engine-X) and remove Apache from the equation.

This saw some incredible results.  However, several times since switching I've run into several database issues where it appears Mysql runs out of memory!  Performing a top command shows over 15 mysql processes running at anyone giving time each taking up to 10% of the memory.  On a micro instance I only get 600mb, so this adds up quickly!

Are you having CakePHP and NGINX Rewrite Rule Issues?

Published on Sep 10, 2012

In a recent blog post – It's LEMP Not LAMP – I discussed about making the switch to using NGINX (pronounced Engine-X).  I had little-to-no issues getting by basic Wordpress blogs up and running.  However, for some reason I couldn't get my older CakePHP sites up and working.

I was racking my brain forever, trying everything I could think of with the rewrite rules – thinking for sure this must be the root of the cause.  In the end I thought it might just be an issue with the version of CakePHP I was using, as it was an older version (1.2.x).  However, I just grabbed a clean copy from CakePHP's Github of 1.2.10 and got it up and running without issues.

I'm of course even more confused at this point, so why am I writing this blog post you ask?  The answer is simple, if you're having issues with getting an old CakePHP site to work on NGINX, try upgrading your CakePHP version.

It's LEMP not LAMP!

Published on Sep 6, 2012

I'm sure many of you have heard the term LAMP before – standing for Linux Apache Mysql and PHP.  This is a very typical setup for many open source websites.  It's been around for ages.  But make way for LEMP.  In a recent report by w3techs, a new HTTP server is climbing its way up the ranks called nginx, but it is pronounced Engine-X; hence, the term LEMP – standing for Linux Engine-X (nginx) Mysql and PHP.

According to this w3techs report nginx is now used by almost 12.5% of the websites we know what web server they are running on.  More significantly a staggering 28.2% (of the 12.5%) websites rank in the top 1,000 worldwide (according to their Alexa ranking).

Along with my recent switch to Amazon EC2, I also decided to switch to a LEMP stack.  I thought I should throw out another shout out to for this AMAZING step-by-step tutorial on installing a LEMP stack with extremely simple to follow instructions on my brand new Ubuntu 12 server.

Check out the step-by-step instructions to setting up your LEMP server.

I think I only had to make one modification to this instruction set before being able to perform one of the apt-get install commands I had to perform an update on the box.  Luckily enough, the OS told me exactly what to do!

A friend and former colleague introduced me to nginx a while back with his blog about Setting up WordPress with nginx and FastCGI.  This is quite useful for understanding the nginx configuration for a virtual host that requires rewrite rules as nginx currently has no support for .htaccess files!