{"id":21522,"date":"2017-03-01T07:39:37","date_gmt":"2017-03-01T13:39:37","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=21522"},"modified":"2022-06-03T03:42:17","modified_gmt":"2022-06-03T08:42:17","slug":"how-to-secure-your-lemp-stack","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-secure-your-lemp-stack\/","title":{"rendered":"How to secure LEMP stack"},"content":{"rendered":"
<\/div>

\"How<\/p>\n

We’ll show you, how to secure LEMP stack. LEMP, it stands for Linux, (EngineX) NGINX<\/a>, MariaDB<\/a> (or MySQL<\/a>) and PHP<\/a>. Due to its flexibility and simplicity,\u00a0NGINX slowly takes over the Internet. In this tutorial, we will attempt, through examples of bad and good practices, to go\u00a0through the steps of properly securing your Linux web server. So what is the term Security?\u00a0Often you can hear the IT Engineers saying\u00a0“Our network is secure” <\/em>or “Our servers are secure” <\/em>however, those sentences although widely used are\u00a0technically not correct, as in many books and publications you can find that\u00a0Security<\/em> as a term is not a static value, but rather a degree.\u00a0From Wikipedia<\/a> the definition is:
\n“Security is the degree of resistance to, or protection from harm. It applies to any vulnerable and\/or valuable asset, such as a person, dwelling, community, item, nation, or organization.”
\n<\/em>In terms of servers or applications,\u00a0one should always be aware that the more secure their server or application is, the less accessible it becomes (it is harder to be accessed).<\/p>\n

Of course, the best\u00a0example for this is the proverb:
\n “The most secure server is the one that is switched off.”<\/em>.<\/p>\n

As ridiculous as it may sound, this is occasionally practiced by some organizations today, where their\u00a0most\u00a0secure servers are kept offline and\/or in totally closed networks and are powered on only when they need to be.<\/p>\n

Intended audience
\n<\/strong><\/h3>\n

Before going any further we must point out that this guide is aimed at\u00a0intermediate users with some knowledge of installing and configuring the LEMP stack. We will assume that you (the reader) already have the relevant\u00a0knowledge for handling a Linux operating system. This guide is not for beginners. Many other related topics are connected to this guide and things\u00a0like installing the LEMP stack<\/a>, installing SSL certificates<\/a>, configuring public key authentication<\/a> and many other are out of the scope of this tutorial. However, you can get a VPS from us<\/a> and we’ll do all of this (and more!) for you, for free. So you don’t really need any Linux administrating skills if you get a Managed VPS from us.<\/p>\n

Prerequisites<\/strong><\/h3>\n