We’ll show you, how to secure LEMP stack. LEMP, it stands for Linux, (EngineX) NGINX, MariaDB (or MySQL) and PHP. Due to its flexibility and simplicity, NGINX slowly takes over the Internet. In this tutorial, we will attempt, through examples of bad and good practices, to go through the steps of properly securing your Linux web server. So what is the term Security? Often you can hear the IT Engineers saying “Our network is secure” or “Our servers are secure” however, those sentences although widely used are technically not correct, as in many books and publications you can find that Security as a term is not a static value, but rather a degree. From Wikipedia the definition is:
“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.”
In terms of servers or applications, one should always be aware that the more secure their server or application is, the less accessible it becomes (it is harder to be accessed).
Of course, the best example for this is the proverb:
“The most secure server is the one that is switched off.”.
As ridiculous as it may sound, this is occasionally practiced by some organizations today, where their most secure servers are kept offline and/or in totally closed networks and are powered on only when they need to be.