We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
[HowTo] Optimize Nginx and PHP-FPM using VestaCP on CentOS
[HowTo] Optimize Nginx and PHP-FPM using VestaCP on CentOS
NGINX
Nginx configs are by default located under at /etc/nginx :
Edit Nginx Config :
First :
Once you open the file for edit you need to change this “worker_rlimit_nofile” value :
From :
To :
uncomment the line remove “#”
*Value “65535” can be different on your server
Second :
find the “worker_connections” :
From:
To :
Once you changed this value restart nginx service :
PHP-FPM
By default php-fpm configs are by default located under at /etc/php-fpm.d
when you navigate to this dir you’ll find bunch of configs (domain.com.conf) are located under this dir open the config file for your website and change the value :
open your website domain name config file :
And change this Values :-
From :
To :
once you saved the config restart PHP-FPM service :
This are the optimal settings which can handle 2000-3000 real time visitor according to your server config very easily even more.
Nginx configs are by default located under at /etc/nginx :
Edit Nginx Config :
Code: Select all
nano /etc/nginx/nginx.conf
Once you open the file for edit you need to change this “worker_rlimit_nofile” value :
From :
Code: Select all
#worker_rlimit_nofile 65535;
Code: Select all
worker_rlimit_nofile 65535;
*Value “65535” can be different on your server
Second :
find the “worker_connections” :
From:
Code: Select all
worker_connections 1024;
Code: Select all
worker_connections 5000;
Code: Select all
service nginx restart
By default php-fpm configs are by default located under at /etc/php-fpm.d
when you navigate to this dir you’ll find bunch of configs (domain.com.conf) are located under this dir open the config file for your website and change the value :
open your website domain name config file :
Code: Select all
cd /etc/php-fpm.d
nano your-website-name.com.conf
From :
Code: Select all
pm.max_children = 4
pm.max_requests = 4000
Code: Select all
pm.max_children = 10
pm.max_requests = 6000
Code: Select all
service php-fpm restart
Re: [HowTo] Optimize Nginx and PHP-FPM using VestaCP on CentOS
Is it just when one uses only nginx or it also work for nginx + apache?
What are the RAM and CPU config for this values?
Thank you, xorro!
What are the RAM and CPU config for this values?
Thank you, xorro!