SOLVED After udpating to version 104.0.4 nginx configuration resetting..

Bentok

Active Member
Jan 14, 2015
26
1
53
cPanel Access Level
Website Owner
Hello,

Before this version: 104.0.4 I didn't have such problem, but after auto-updating to current version, nginx.conf file keep resetting (my site don't work with your default setting so have to tweak my own settings), before there was no such things, don't know what did you do to the new version that keep doing that, even when I restart apache it resets worker_processes to 1;

I set it to my process number or even to auto:

worker_processes auto;

But it resets again. please fix this issue. and if possible to not add client_max_body_size inside /conf.d/ea-nginx.conf

Becuase a lot of users may need their own custom settings for this as well, they might add it in nginx.conf or in includes files. I'm so frustrated after it resets my custom configuration after this upgrade! my site can't handle the default because it's a big site needs my own settings.

Hope you consider this ticket and hope if there are another users who has the same issue find this helpful.

Thanks in advance!

Best regards,
 

Bentok

Active Member
Jan 14, 2015
26
1
53
cPanel Access Level
Website Owner
Hey there! Just to confirm, you're seeing that after cPanel updated to 104.0.4, the "worker_processes" setting inside /etc/nginx/conf.d/ea-nginx.conf file is being automatically rest to 1 - is that correct?
Hello

"worker_processes" setting inside /etc/nginx/nginx.conf file is being automatically reset to 1. not inside ea-nginx. but for example if I have client_max_body_size set in nginx.conf and comment it in ea-nginx.conf (/etc/nginx/conf.d/ea-nginx.conf) then again it reset it in that file as well, even in my other server so it's not just specific to one server.

worker_processes should be set to auto; and if possible moving client_max_body_size to nginx.conf instead of ea-nginx.conf is a better choice, because everytime if I rebuild nginx or restart apache it reset ea-nginx config and the client_max_body_size to it's default value. So nginx.conf file should not be changed by cpanel update or anything else when user sets it's own configuration in it. because of that reset I got a bit problem and had to make nginx.conf file read only so it can't be changed after rebuild or restart attempt.
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
15,139
2,404
363
cPanel Access Level
Root Administrator
Thanks for the additional details. To test this, I did the following:

-created a cPanel server running 102.0.18
-installed Nginx through EA4
-confirmed the default configuration was in place in that file:

Code:
# grep worker_processes /etc/nginx/nginx.conf
worker_processes  1;
-edited the file to change the value to "auto"
-forced a cPanel update, ensuring the server was pinned to version 102.0.18
-checked the file again:

Code:
#  grep worker_processes /etc/nginx/nginx.conf
worker_processes  1;
This shows that the issue isn't with the update to version 104, but any update to the system as we overwrite that configuration file.

In general, /etc/nginx/nginx.conf isn't a configuration file that we design to edit. If you need to make adjustments to the values in that file you'll want to use includes as mentioned in the Global Configuration section of our documentation here:

 
  • Like
Reactions: Bentok

Bentok

Active Member
Jan 14, 2015
26
1
53
cPanel Access Level
Website Owner
Thanks, now I get it, I read the document and applied the settings in the /ea-nginx/settings.json

And added necessary files to conf.d folders.

Have a great day!
 
Last edited: