So Long, Apache

Apache just retired from my web server. I’ll tell you why.

As a noob to hosting my own website I cut my teeth on a LAMP installation (Linux, Apache, MySQL and PHP) when I was setting up my first Raspberry Pi (Model 2b). It currently hosts Bendayo and my wife’s illustration portfolio.

While browsing around for info on Pi networking I kept hearing the names NGiNX and MariaDB. People were claiming huge cuts in resources and load times, so ultimately I had to check it out for myself…

NGINX, MariaDB, PHP-FPM and WordPress logosAfter a long day of figuring out how best to backup and restore both sites, I finally had two Pi servers – Pi2b running the original LAMP setup, and a newer Pi3b running LEMP (Linux, NGiNX, MariaDB, PHP-FPM).

I learned one very important thing during the transfer process: don’t use a cheap microSD reader plugged into the back of a hot Mac Mini and “dd” to copy a Micro SD card for EIGHT HOURS. It corrupted the original card and I was extremely fortunate to have an S3 backup of both WordPress sites and their respective SQL databases.

 

If It Ain’t Broke, Fix It

Gilfoyle and Dinesh presenting a computer

The Apache-based setup I had was running fine. Both sites were fully operational with no downtime to speak of. However, page loads were somewhat slow, and the limitations of the Pi2b hardware were, in my opinion, starting to show. Since switching both websites over to NGiNX and using FastCGI caching instead of Apache and WordPress Supercache, they display considerably faster. They also have a far lower impact on system resources.

 

In conclusion, I’m a happy camper. I’m sure to be tweaking it endlessly, as a learning exercise more than anything, but I’ll be sticking with NGiNX and co for a while.

But wait, there's more!

I’ve just come across a package that seems capable of streamlining the install/config process for a LEMP setup. It’s called EasyEngine.  I like to do things the hard way so I can enjoy solving problems and learning, but as a time-saver I may try it out next time I upgrade the server hardware. If you have any experience with EasyEngine, let me know in the comments!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.