How to Configure Nginx for Optimized Performance on Centos 7

Hi All,

I want to ask about how to optimize. Calculation RAM & CPU to set appropriate parameters.

I use CentOS 7 with Vestacp (Apache + Nginx).

And let me ask the meaning of keepalive_timeout 60 60;

Thanks. Lu Bang Thang


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


I can recommend you few DigitalOcean that could help you. This is not something VestaCP specific, but this will help tweak both Apache and Nginx if you want.


How to optimize Nginx is older Debian tutorial, but it will still do its job, even on Centos. Nginx directives are same for all distros, so this is not problem. Beside that I would recommend some more steps like: Installing gzip - this tutorial for Centos 7 will help you learn more about it. In case you are using Wordpress this can help you. In case of PHP application, FastCGI caching can help.

For keepalive_timeout under nginx - syntax of it is keepalive_timeout timeout (header_timeout) This is used to specify how long keep-alive client connection will stay open on server side. header_timeout is used to specify that time in Keep-alive response header.

Learn more about nginx modules on offical nginx site.


How to optimize Apache Apache Content Caching

If you need more help don’t hesitate to post here :)

This comment has been deleted