imorandin

Active Member
PartnerNOC
Nov 20, 2014
25
5
53
cPanel Access Level
DataCenter Provider
Hi,

I'm using cpanel's nginx in proxy mode and noticed that it can consume a quite large amount of ram per thread (2GB):

1650380627369.png

We used Engintron but we're migrating to cpanel's native nginx. I noticed that it is a bit "plain" in the optimization department so we want to use some of the Engintron's config in to it. Where is the recommended file to put this? in /etc/nginx/ea-nginx/cache.json?

client_body_buffer_size 128k;
client_body_timeout 30s; # Use 5s for high-traffic sites
client_header_timeout 30s; # Use 5s for high-traffic sites
client_max_body_size 128m;
keepalive_timeout 30s;
open_file_cache max=200000 inactive=20s;
open_file_cache_errors on;
open_file_cache_min_uses 2;
open_file_cache_valid 30s;
port_in_redirect off;
reset_timedout_connection on;
send_timeout 30s;
sendfile on;
server_name_in_redirect off;
server_names_hash_bucket_size 1024;
server_names_hash_max_size 1024;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
types_hash_max_size 2048;

Thanks,

Ignacio
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
Hey there! The global configuration details for Nginx can be found here:


but you won't want to edit the /etc/nginx/ea-nginx/cache.json as that will likely be overwritten and have unintended consequences.

We had a discussion not too long ago about some custom variables you also may find relevant: SOLVED - NGINX as a reverse proxy: Cannot override cPanel's cpanel-proxy.conf settings

Let me know if that helps!