Installation of the NGINX server, setting, tuning
On VPS 2GB OZU, 2 nuclei installed LEMP connection: Linux + NGINX (Enginex) + MariaDB + PHP.GNU Linux: the operating system
NGINX: the server
MariaDB: a database
PHP: the processor of requests received through php-fpm
This server configuration (2 core and 2GB OZU) is sufficient for the project to work with at least 10,000 visitors per day.That is, in principle, enough for most projects.The control panel was not installed becauseIt draws a lot of resources, and the main goal of moving to VPS with NGINX is to accelerate the speed of the site.All controls and settings only through the console (in the screenshot below).There is the possibility of connecting through FTP, switching to the usual phpmyadmin panel.Set login only on the key (without entering a password and by downloading the file).that is.If no one has this file, it’s very difficult to break you.The server has been optimized (tuning).- set static cache files (FastCGI cache) for images, JS, CSS.Now, when re-linking the file, the server does not request it again using the database, but immediately gives the client the cache version of the page.- the GZIP compression is enabled and its "power" is set.- Implemented settings to process the optimal number of simultaneous connections with current visibility.A SSL certificate is installed and the site is connected to Cloudflare.The CloudPlayer is set to reduce the load on the server and prevent access to harmful bots that senselessly load the server and uselessly waste resources.
NGINX: the server
MariaDB: a database
PHP: the processor of requests received through php-fpm
This server configuration (2 core and 2GB OZU) is sufficient for the project to work with at least 10,000 visitors per day.That is, in principle, enough for most projects.The control panel was not installed becauseIt draws a lot of resources, and the main goal of moving to VPS with NGINX is to accelerate the speed of the site.All controls and settings only through the console (in the screenshot below).There is the possibility of connecting through FTP, switching to the usual phpmyadmin panel.Set login only on the key (without entering a password and by downloading the file).that is.If no one has this file, it’s very difficult to break you.The server has been optimized (tuning).- set static cache files (FastCGI cache) for images, JS, CSS.Now, when re-linking the file, the server does not request it again using the database, but immediately gives the client the cache version of the page.- the GZIP compression is enabled and its "power" is set.- Implemented settings to process the optimal number of simultaneous connections with current visibility.A SSL certificate is installed and the site is connected to Cloudflare.The CloudPlayer is set to reduce the load on the server and prevent access to harmful bots that senselessly load the server and uselessly waste resources.