One common requirement for a web site, especially in the age of mandatory SSL, is to ensure that its address is a) consistent, and b) forwards to SSL. In other words, when a visitor types in http://www.mysite.com/, http://mysite.com/, OR https://mysite.com/, they should be sent to https://www.mysite.com/. To do this, we’ll set up some Nginx server […]
Tag: Nginx
Free SSL Certificates with Let’s Encrypt (Ubuntu 16)
Running a secure web site provides a better experience for anyone using your site. These days (2018), search engines also favor web sites that use SSL/HTTPS, so utilizing SSL is an important aspect of SEO. But buying a new SSL certificate every couple of years can get expensive, particularly if you run multiple web sites […]
Installing an SSL Certificate on Nginx
Update April 2018: I’d suggest using Let’s Encrypt for this instead. How to create and install an SSL certificate for Nginx 1.10 on Ubuntu 16. (Apache setup here.) This setup also gets you an A on the SSL Labs SSL Server Test. Part I: Create and Obtain your SSL Cert 1. Create your key and […]
WordPress: Optimizing Nginx and WP Super Cache
Today we’re going to compare the performance of a WordPress site before and after we install and optimize the WP Super Cache plugin. We’re running Ubuntu 16.04 Server, Nginx 1.10, PHP 7 with the Zend OPcache, MariaDB, and WordPress 4.6 with a few other plugins (Akismet, Jetpack, Yoast SEO, and Google Analytics). The system itself […]
Recompile Nginx (1.9+) Installed with Apt On Ubuntu 16.04
As mentioned in my older article on the subject, for many years Nginx had no hook for dynamically adding new modules, which meant having to recompile Nginx to add functionality. But the Nginx company has worked to address that issue: as of version 1.9.11, Nginx supports dynamic module loading. Still, there may be cases where […]
Install the Latest Nginx From Source on Ubuntu 16.04
So you want to install Nginx from source on Ubuntu. However, you want Nginx to work like you had installed it with the package manager. This means the startup file (/etc/init.d/nginx), binary (/usr/sbin/nginx), config directory (/etc/nginx/) and log files (/var/log/nginx/) will all be found in the usual Debian/Ubuntu locations. Fortunately this is pretty easy to […]
Ubuntu 16.04 Web Server with Nginx, MariaDB, Redis, and Drupal 8
As mentioned in my Ubuntu 16.04 and Drupal 7 article, the Ubuntu 16 LTS version has some nice upgrades, including PHP 7, MySQL 5.7, Nginx 1.10, Apache 2.4.18, and MariaDB 10.0.x. Let’s see if we can make it work with Nginx, PHP-FPM, MariaDB, and Drupal 8, using the Redis key-value store as the backend cache […]
Ubuntu 16.04 Web Server with Nginx, MariaDB, Redis, and Drupal 7
The Drupal 8 version of this article can be found here. As of today, April 21, 2016, Canonical has released Ubuntu 16.04 Server, supported until 2021. Ubuntu 16.04 has some nice enhancements, and some changes that will affect sysadmins and developers: it ships with Python 3 as the default Python, plus PHP 7, MySQL 5.7, […]
Web Server Performance 2016
This is a shorthand summary of web server performance and caching systems as of March 2016. General disclaimer: I try to link benchmark results that seem relatively neutral, but as with any survey or study or benchmark roundup, the most pertinent question is cui bono? Ultimately the only reliable benchmarks are those you run yourself […]
Nginx + PHP-FPM + PHP Cache + SSL + Varnish + Drupal
Note: The below instructions are for Varnish 3 on Ubuntu 12. If you want to run Drupal with Varnish 4 on Ubuntu 16, updated instructions are here. So, you want to set up Nginx and Drupal with all the bells and whistles on Ubuntu Server 12.04. You want caching for both PHP and Varnish and […]