NGINX

RunCache & WP Rocket Bridge

7th March 2020

I always think Runcloud is amazing, and with their own priority RunCache Purger plugin so that NGINX caches pages (which means it doesn’t need to pass through PHP – yay!), it’s an awesome tool however, WP Rocket is incompatible and vice-versa. I ❤️ WP Rocket, so I decided to create a mini WordPress plugin which bridges the gap!

RunCache Speed Example

The above image is a speed example of this blog post after being cached into NGINX and doing a hard refresh (CTRL + F5). 41ms response time! 😍

(more…)

Serve static content from a cookieless domain in NGINX

1st June 2017

Very simple one to help anyone out there fix the issue regarding serving static content from a cookieless domain in NGINX. This does not require a CDN or sub domain, etc like most tutorials.

It’s simply a few lines of code to add to your host file:

location ~* ^.+\.(jpeg|jpg|png|gif|bmp|ico|svg|css|js|scss|map|less|woff|woff2|otf|eot|ttf)$ {
   expires     max;
   fastcgi_hide_header "Set-Cookie";
}

(more…)

Redirect HTTP to HTTPS in VestaCP with NGINX

14th March 2017

Very simple trick here, but has a few people at a road block. If you’re running NGINX on VestaCP then the following will redirect all HTTP traffic to HTTPS traffic. Just make sure you’ve got a SSL certificate set-up and working. (more…)

VestaCP Server Installer – The Perfect Server

5th October 2016

NOW WORKS WITH THE NEW VERSION 0.9.8-20! 🙂

Please upgrade to VestaCP release 20. A security flaw currently affecting servers is present in release < 20. If upgrade is not yet available, please patch

I decided to create the perfect VestaCP server installer script (in my opinion) for CentOS 7 (I have only tried it on CentOS 7). Basically, you run it, it asks a few questions and then it sets up a perfect server including CSF, Monit and PHP 7 (if you want it). Amazing, right?

(more…)

Stronger Security SSL/HTTPS in NGINX VestaCP

12th May 2016

Security is paramount these days and visitors to your website want to know their browsing and transmission of data is 100% safe. How do you test this? At Quality SSL Labs of course! It’s time to secure your NGINX install once-and-for-all.

As of today, my blog is running Let’s Encrypt – the absolutely free SSL Certificate authority and my rating is A+ (I’m OK with that!) at Quality SSL Labs. Before with a default install of NGINX and VestaCP my rating was B.
(more…)

Remove trailing slashes in NGINX & WordPress

12th May 2016

If you hate those trailing slashes or perhaps you’re just a fan of good SEO practices then you’ll probably want to remove the trailing slashes from your WordPress installation and edit your NGINX configuration to make sure anything WITH a trailing slash is sent permanently (301 redirect) to the page without a slash. (more…)

How to install ngx_pagespeed with NGINX in VestaCP

12th May 2016

This tutorial for ngx_pagespeed has only been tested with Debian 7. I will provide the alternate commands for RedHat, CentOS, or Fedora but I have not tested this.

I first installed and compired NGINX from source BEFORE removing the packages incase I hit any problems, then issued the commands AGAIN to confirm it was all working. As usual – take backups! (more…)