openec2 Article Description

Debian 11 and Nginx – Part 1

Introduction

A heads up…

There are various packages and configurations when installing Linux. This lesson covers the basic installation. Later we will add more content for Let’s Encrypt SSL, postfix, and so forth.

Separate lessons would cover Apache2, or HTTPD in Amazon Linux 2023.

I found LiteSpeed way too detailed and time consuming, and wondered why use it with faster performance from NGINX.

Nginx can have difficulty for us ordinary folks if we go outside use of a standard domain or subdomain in WordPress.

I also found some issues with WordPress plugins. I now stick with WP Solid Security and W3 Total Cache. I added additional nginx .conf files sourced from various Internet articles, to add extra security. If you find you cannot update WordPress or a page goes blank, likely a .conf file setting. The Internet articles I have gone through often gave examples that do not work on the current standard Nginx version, or were incomplete.

Our smaller EC2 instances do not handle Apache2 or Linux2023 httpd using http/2 – another reason to use Nginx.

I installed an application using older dependencies with Debian 11 X86 and PHP7.4. I was not able to install Axigen on ARM architecture or Debian 12. I am sticking to Debain 11 ARM where able, for now.

My preference is for Amazon Linux 2023 despite complaints on various Internet forums.

I also found Linux 2023 gave me no problems with the vi editor and classic shell scripts. I had to work out how to get things to work in Debian.

Debian is of course available in Akamia/Linode.

Nginx must use php-fpm. We also add opcache and memcached. I have had many issues with WordPress consuming resources, so I do install memcached, and I edit web pages on Chrome rather than Firefox. That is how it rolls at the moment. I also increase php.ini’s memory_limit to 512GB instead of 128 or 256.

If using a cPanel service that is being hammered by multi-sites, as these services usually use LiteSpeed, you can change the PHP defaults even up to 1GB if there are 503 resource errors, use memcached, (not “memcache”) and put in the LiteSpeed WordPress plugin, then check for any usable memcached settings. You should not be on PHP7.4 anymore, at all. A web administrator can help a client set these up as they won’t know.