Skip to main content

After udpating to version 104.0.4 nginx configuration resetting..

Comments

7 comments

  • cPRex Jurassic Moderator
    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?
    0
  • Bentok
    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.
    0
  • cPRex Jurassic Moderator
    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: # 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: # 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:
    0
  • Bentok
    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!
    0
  • cPRex Jurassic Moderator
    You're very welcome! I'm glad that helped!
    0
  • fiberit
    So what do we have to do to avoid this reset every day ?
    0
  • cPRex Jurassic Moderator
    @fiberit - there isn't a supported way to edit the /etc/nginx/nginx.conf file on a cPanel machine. You'll have to use the include system we talk about at NGINX with Reverse Proxy | cPanel & WHM Documentation to make those changes in a way that is compatible with the system.
    0

Please sign in to leave a comment.