How to Setup Nginx Reverse Proxy

This post shows students and new users steps to setup a reverse proxy on Nginx HTTP server. Nginx is often used as a reverse proxy for HTTP and non-HTTP servers. A reverse proxy is a service sits between the client and backend servers.

The proxy server takes and directs client requests to the appropriate backend servers. A proxy server can also perform additional tasks such as SSL encryption, caching, compression and load balancing to take the load off the backend servers.

A reverse proxy server is typically used in front of Node.jsPythonJava and other popular applications that do not have web server features enabled. In this case, Nginx is usually the proxy server used to handle requests for clients.

Below we’ll show you how to use Nginx as a reverse proxy for most applications and backend servers. We’ll give you some basic settings that may be used in your environments.

Also, for students and new users learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

Continue reading “How to Setup Nginx Reverse Proxy”

How to Install LEMP on Ubuntu Linux

This post shows students and new users steps to install and use the LEMP stack on Ubuntu Linux.

LEMP is an acronym for Linux (Ubuntu), E Nginx [engine x], MariaDB or MySQL and PHP Scripting Language. It is a group of open source software and building blocks for many of the web applications and majority of the content management systems (CMS) in use today.

Many of the popular content management systems being used today are using some combinations of this opensource framework. From WordPress to Drupal to Joomla and many others, they’re all using the LEMP stack to power their applications.

If you’re going to be developing any PHP based applications or websites, then you’re probably going to be using the LEMP stack as well. Below, we’ll show you how to get the stack up and running on Ubuntu Linux.

If you’re a student or new user learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

Continue reading “How to Install LEMP on Ubuntu Linux”

How to Install Nginx on Ubuntu Linux

This post shows students and new users steps to install, configure and use Nginx HTTP web server on Ubuntu Linux. Nginx is probably the second most popular open source web server in the world. Chances are many of the websites you visit today mostly likely are running Nginx HTTP server.

If you’re thinking of running a website, you’re more likely to go with Nginx or have support for Nginx on web hosting companies than other web servers. Nginx provides powerful features which can be extended by a wide variety of modules.

If you’re a student or new user learning Linux, the easiest place to start learning is on Ubuntu Linux. Ubuntu is the modern, open source Linux operating system for desktop, servers and other devices.

Continue reading “How to Install Nginx on Ubuntu Linux”

How to Install the LEMP Stack on Windows WSL

This brief tutorial shows students and new users how to install the LEMP stack on Windows 10 WSL (Windows Subsystem for Linux) 2 with Ubuntu OS.

LEMP is an acronym for Linux (Ubuntu), Nginx [engine x] HTTP Server, MariaDB or MySQL Database Server and PHP Scripting Language. It is a group of open source software and building blocks of many of the web applications and majority of the content management systems (CMS) in use today.

Now that you can install Linux OS inside Windows via WSL, the steps below show you how to install the LEMP stack in Windows.

With WSL, you can install and run full Linux operating system inside Windows. So get Windows, enable WSL, install a Linux OS and run LEMP.

Back in 2017, Windows released the original WSL version. WSL 2 is an improvement over version 1 and comes with performance boost, full system call compatibility, and built with a new architecture and that delivers features that make WSL an amazing way to run a Linux environment in Windows.

If you have a machine that meets the requirements above to run WSL 2, then continue below.

Continue reading “How to Install the LEMP Stack on Windows WSL”

How to Install PageSpeed Module on Ubuntu

This brief tutorial shows students and new users how to install Google PageSpeed module on Ubuntu 20.04 | 18.04 with Nginx HTTP support.

PageSpeed module is an open source, Apache backed and created by Google to help make web pages load faster by rewriting them to improve latency and decrease bandwidth.

The PageSpeed module was created long time ago and you probably won’t see it installed on too many web pages online today. But the concept behind it is still relevant.

The primary goal behind the PageSpeed project was to optimize websites automatically, thus creating a better web experience on any device for users.

If you’re running a website today and you want to give your users better experience by optimizing your web pages, then PageSpeed module should be a great place to start.

I use it on this site and it’s performing great for my audience.

For more about PageSpeed module, please check its website here.

Continue reading “How to Install PageSpeed Module on Ubuntu”

How to Remove Nginx from Ubuntu

This brief tutorial shows students and new users how remove Nginx and/or purge from Ubuntu 20.04 | 18.04.

If you’re a webmaster and you want to remove Nginx web server from your host, the steps below will show you.

There are basically two ways to uninstall or remove programs from Ubuntu and Linux systems.

You can either run the apt remove or apt purge.

When you use the remove option with apt, the command will delete the software package from the system, but leave the configuration files behind.

Using purge with apt will delete the software package including all configurating files and settings.

Continue reading “How to Remove Nginx from Ubuntu”

How to Install Nginx on Ubuntu 20.04 | 18.04

This brief tutorial shows students and new users how to install Nginx HTTP server on Ubuntu 20.04 | 18.04.

Nginx, pronounced “engine x” is a free, opensource, cross-platform, high-performance HTTP and reverse proxy that can be used to mange high traffic websites.

Whether you want to run a personal website or company portal, Nginx is a powerful webserver that can serve all your users.

Installing Nginx on Ubuntu is pretty simple and straightforward. In fact, Nginx packages are available in Ubuntu repositories.

All one has to do is run the apt get command to install it.

Continue reading “How to Install Nginx on Ubuntu 20.04 | 18.04”

Improve Nginx Cache Performance with tmpfs on Ubuntu

This brief tutorial shows students and new users how to improve Nginx performance by mounting ngx_pagespeed, fastcgi_cache or proxy_cache in RAM or memory with tmpfs.

Nowadays, everyone wants their websites to run faster. If you’re using Nginx with either of the caching modules above, mounting any of those cache pages in memory via tmpfs is a smart move.

By default, Nginx will store its cache data on disk. Even if you’re using SSD disks, caches in RAM will still perform better than on disk.

If you have enough RAM on your server, one of the best optimization methods is mounting cache pages in RAM.

The steps below will get you started easily.

Continue reading “Improve Nginx Cache Performance with tmpfs on Ubuntu”

How to Add Brotli Support to Nginx on Ubuntu 18.04 | 16.04

This brief tutorial shows students and new users how to add Brotli support to Nginx when using Ubuntu 18.04 | 16.04.

Brotli ( br for short), is an open source compression algorithm developed by Google that can be used as an alternative to Gzip, Zopfli and Deflate. In some studies, data can be compressed by 10 to 20 percent more than current compression algorithms.

If you want to use Brotli with Nginx, you’ll have to use the ngx_brotli module developed by Google, since Nginx doesn’t have an official support, at least for its free version.

Nginx commercial version might have support for Brotli.

Continue reading “How to Add Brotli Support to Nginx on Ubuntu 18.04 | 16.04”

How to fix 413 Request Entity too Large with WordPress and Nginx

This brief tutorial shows students and new users steps to resolve a common error with WordPress when trying to upload files, media and other data and get shown an error the says “413 Request Entity Too Large” via Nginx.

This error, 413 request entity too large occurs when you try to upload or make a client request that is too large to be processed by the web server, in the case a Nginx HTTP server.

If the server setting has a request size limit that is too small, your users / clients may come across this error a lot. So you will probably want to adjust the web server settings to allow larger requests.

One of the common issues webmasters encounter when managing WordPress is allow the server to allow file upload via WordPress media library.

WordPress allows users to upload new themes and plugins files, however, if your Nginx powered website isn’t configured to allow large file to be uploaded, the upload process will fail always.

Continue reading “How to fix 413 Request Entity too Large with WordPress and Nginx”

Setup | Configure Reverse Proxies using Nginx HTTP Server on Ubuntu 18.04

This brief tutorial shows students and new users how to install and configure reverse proxies with Nginx HTTP Server.

Reverse proxy is when a proxy server (in this case, Nginx HTTP) accepts all traffic and forwards it to a specific resource, like a backend server or container.

Nginx HTTP server is one of the most popular open source web servers that is also a reverse proxy.

There are many reasons to install and use a proxy server. Example, reverse proxy can be used to added security, or for load balancing, restrict access to certain locations in order to prevent attacks and many more.

When you’re ready to configure Nginx as reverse proxy, follow the steps below:

Continue reading “Setup | Configure Reverse Proxies using Nginx HTTP Server on Ubuntu 18.04”

Nginx 1.17.0 Released — Here’s How to Install on Ubuntu 16.04 | 18.04 LTS

Nginx, a powerful and lightweight HTTP server has recently been updated to mainline version 1.17.0. Nginx mainline branch is an active development branch where the latest features and bug fixes get added.

This release brings some bug fixes and new features that users may want to test out, including support for variables in bandwidth‑limiting configurations with the limit_rate directive, development started for support for QUIC and HTTP/3 and more.

For students and new users who want to upgrade to this release, the steps below should be a great place to start.

For more about this release, please read the changelog here.

Below is a list of bug fixes and new features introduced with this release.

Continue reading “Nginx 1.17.0 Released — Here’s How to Install on Ubuntu 16.04 | 18.04 LTS”