Checking the status of NGINX on Ubuntu

How to check NGINX status on Ubuntu

After installing NGINX on Ubuntu Linux, either as a web server or reverse proxy server, you’ll need to learn the basics of administrating the service. In this tutorial, we’ll show how to check the status of NGINX on Ubuntu. This will give you information about the state of the NGINX service, to help you determine if it’s running, accepting connections successfully, etc. We’ll also explain the various states of NGINX, so you know what to do with the information that’s presented.

Read more

How to check Nginx version on Linux

How to check Nginx version on Linux

In this tutorial, we will show how to checck the installed version of Nginx on a Linux system. Nginx is one of the most popular web server suites deployed across the internet and can be used as both a web server and a reverse proxy server. Knowing your version of Nginx will allow you to check for updates and install new features, compatibility with other Linux or web hosting components, and with ensuring that your current version of Nginx does not contain any published security vulnerabilities.

Read more

OpenLiteSpeed vs Nginx

OpenLiteSpeed vs Nginx

One of the first – and most crucial – decisions that a website owner will need to make is what type of web server to use. The decision to host your website on a Linux system is a no brainer, but when it comes to web servers, there are a few choices and they all come with their own pros and cons. Among the most popular on Linux is NGINX and OpenLiteSpeed, both well known for their speed and ability to host concurrent connections.

Read more

LEMP stack running successfully on AlmaLinux

How to install LEMP stack on AlmaLinux

A LEMP stack is an assortment of software that contains everything you need in order to serve a website, show dynamic content, and store or retrieve data from a database. The software is all within the LEMP acronym, namely the Linux operating system, NGINX web server, MySQL database (or MariaDB alternatively), and PHP programming language.

If you’ve installed AlmaLinux or migrated from CentOS to AlmaLinux, then you already have the first requirement done. Next, you just need to get your LEMP stack up and running. In this guide, we’ll show the step by step instructions to install a LEMP stack on AlmaLinux.

Note that it’s also possible to install a LAMP stack on AlmaLinux, which is very similar to LEMP except that it contains Apache as the web server instead of NGINX.

In this tutorial you will learn:

  • How to install all LEMP prerequisite packages on AlmaLinux
  • How to secure MariaDB database
  • How to start NGINX and MariaDB services
  • How to open HTTP and HTTPS firewall ports
LEMP stack running successfully on AlmaLinux

LEMP stack running successfully on AlmaLinux

Read more

Successful installation page of NGINX on Linux

How to install Nginx on Linux

NGINX is one of the most popular web server suites deployed across the internet. It’s efficient, versatile, and works well on pretty much any Linux distribution. Whether you need a local server for testing, or want to host a website for the masses, NGINX is easy to set up. It can also be used as a reverse proxy server.

In this guide, we’ll be going through the step by step instructions to install NGINX on a variety of Linux distributions. We’ll also go over some basic usage commands, like how to start and stop the service. Keep reading to get NGINX setup on your own Linux system.

In this tutorial you will learn:

  • How to install NGINX on various Linux distros
  • How to manage the NGINX service
Successful installation page of NGINX on Linux

Successful installation page of NGINX on Linux

Read more

How to disable NGINX logging on Linux system

The default configuration of Nginx webserver logging system is to log both access and error logs for all enabled sites into /var/log/nginx/access.log and /var/log/nginx/error.log respectively. This default behaviour is set by the following directives found within /etc/nginx/nginx.conf configuration file:

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

Read more

Redirect HTTP traffic to HTTPS in NGINX

How to use Nginx to redirect all traffic from http to https

If your website is hosted with NGINX and it has SSL enabled, it’s best practice to disable HTTP completely and force all incoming traffic over to the HTTPS version of the website. This avoids having duplicate content and ensures that all of the site’s users are only browsing the secure version of your website. You should also see an SEO boost, as search engines prefer non-redundant and secured web pages.

In this guide, we’ll assume you’re already using NGINX on a Linux system and want to redirect all HTTP traffic to HTTPS. Even if a user happens to follow an http:// link, the site should send them to the correct and secured page, which happens instantly and without the user’s intervention.

There are two ways to setup this redirection in NGINX. One method allows you to configure the redirection for individual sites. The other method can redirect HTTP to HTTPS for all NGINX sites on your server, which is handy if you have multiple sites setup and want to avoid having to apply the exact same redirection to each one. We’ll cover the step by step instructions for both methods below. Let’s get started.

NOTE
Using Apache instead of NGINX? We’ve written a separate guide for how to use Apache to redirect all HTTP traffic to HTTPS.

In this tutorial you will learn:

  • How to redirect HTTP to HTTPS for individual NGINX websites
  • How to redirect HTTP to HTTPS for all NGINX websites

Read more

Running a WordPress website on Ubuntu 20.04 with Nginx

Ubuntu 20.04: WordPress with Nginx installation

WordPress is an extremely popular content management system (CMS) for websites. Its popularity and ubiquity really cannot be overstated, as it powers a staggering 35% of websites. It’s an easy way to get a website online, and it offers a lot in the way of customization.

Ubuntu 20.04 Focal Fossa and Nginx are the perfect combination to run your WordPress site. Using these utilities will give you a very powerful, efficient, and stable website. Best of all, all this software is completely free and the setup isn’t very difficult. Follow along with our steps below to see how to get your WordPress site up and running on Ubuntu 20.04 with Nginx.

If you’re more familiar with or happen to prefer Apache over Nginx, we’ve written a separate guide for Ubuntu 20.04 WordPress installation on Apache.

In this tutorial you will learn:

  • How to install and configure Nginx
  • How to install and configure MariaDB for MySQL
  • How to setup a MySQL database for WordPress
  • How to download and install WordPress
  • How to configure SSL for your WordPress site

Read more