Server Tag

Serve static content from a cookieless domain in NGINX

Very simple one to help anyone out there fix the issue. 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)$ {
expires     max;
fastcgi_hide_header "Set-Cookie";
}

Test Clamd (ClamAV Scanner)

test clamd/clamavRecently I had to test clamd/clamAV to do this today just to make sure my antivirus scanner was working. I’m a big fan of not installing antivirus software for e-mails, because I strongly believe SpamAssassin eliminates it however, sometimes your clients or e-mails have been around for years – and these days it’s getting even harder to eliminate spam and viruses.

VestaCP Tools Plugin

I have created a little plugin for VestaCP called the VestaCP Tools Plugin (obviously unofficial as they don’t have any official way to create plugins yet). It’s a super simple way to get an overview of what’s going on inside your VestaCP server. It basically lists all the domain names, mail domains, cron jobs, etc globally so you don’t have to login to each individual user to get the data.

vestacptoolsplugin

VestaCP Server Installer – The Perfect Server

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?

How to: Install CSF on VestaCP

Tested on Debian, Ubuntu, and CentOS… how to install CSF on VestaCP.

THIS SCRIPT IS FOR Vesta 0.9.8-15, Vesta 0.9.8-16 and Vesta 0.9.8-17

IT IS ALWAYS A GOOD IDEA TO BACKUP EVERYTHING. BACKUP CSF + VESTA

Remove trailing slashes in NGINX & WordPress

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.

Redirect in NGINX: 301 & 302

NGINX is becoming more popular every second – and it’s because it’s super fast. In this tutorial I’m going to show you the difference between a 301 and 302 redirect in NGINX and how to implement them. But first, let’s know the difference.

301 redirects are what is known as permanent redirects. This tells search engines that the old page has been moved permanently.