Skip to main content
We are currently experiencing a higher than average ticket volume and as such our responses may be delayed. Searching on our Help Center articles or going to our Community is also a great resource for answers.

NGINX Reverse Proxy configuration

Comments

8 comments

  • cPRex Jurassic Moderator

    Hey there!  Yes - details on how to customize the Nginx configuration so the values do not get overwritten can be found here for individual users:

    https://support.cpanel.net/hc/en-us/articles/360052143374-How-to-customize-a-site-s-NGINX-Server-Block

    and here for global settings:

    https://docs.cpanel.net/knowledge-base/web-services/nginx-with-reverse-proxy/#configuration-files

    0
  • Dimitris Andrikopoulos

    Hello,

    I checked the resources you suggested and I didn't find any information about the steps I should take so that when I rebuild the NGINX configuration via the command "/scripts/ea-nginx conf --all", then the generated configuration file "/etc/nginx/conf.d/users/myusser.conf" contain the below settings:

    • the directive "proxy_cache_path" should include the setting "use_temp_path=off".
    • the directive "http2" gets the value "on" instead of "off".
    • the directive "worker_processes" found in the file "/etc/nginx/nginx.conf" gets the value "32" instead of "1".
    0
  • cPRex Jurassic Moderator

    Those main configuration files themselves will not change, as that isn't the intended behavior.  The include files mentioned in the documentation get added in addition to the main etc/nginx/conf.d/users/myusser.conf and /etc/nginx/nginx.conf, as those main files don't change.

    Does that help clear things up?

    0
  • Dimitris Andrikopoulos

    Indeed, I managed to change the files below upon rebuilding the configuration:

    • /etc/nginx/nginx.conf
    • /etc/nginx/conf.d/users/myusser.conf

    Namely, I edited the file "/etc/nginx/ea-nginx/settings.json" and added the below line:

            "worker_processes" : "32"

    I also edited the file "/etc/nginx/ea-nginx/cache.json" and changed the below line as follows:

            "inactive_time" : "7d"

    These changes were propagated at the below files upon rebuilding the NGINX configuration (/scripts/ea-nginx conf --all):

    • /etc/nginx/nginx.conf
    • /etc/nginx/conf.d/users/myusser.conf

    Isn't it possible to do the same for the directives below?

    • use_temp_path = off
    • http2 = on

     

    0
  • cPRex Jurassic Moderator

    You are welcome to add any directives that don't already exist, yes.

    0
  • Dimitris Andrikopoulos

    I have tried to add the below to the files settings.json and cache.json, but they didn't work:

    • use_temp_path = off
    • http2 = on

    It may be the naming convention. I mean the below line which appears at the configuration file "/etc/nginx/conf.d/users/myusser.conf" contains the parameter "inactive" as follows:

           proxy_cache_path /var/cache/ea-nginx/proxy/mysuser levels=1:2 keys_zone=mysuser:10m inactive=7d use_temp_path=off;

    But, this parameter is named as "inactive_time" in the file "/etc/nginx/ea-nginx/cache.json", and not as "inactive". So, maybe the directives use_temp_path and http2 can be also specified in that file, but with different names.

    So, the question is whether there is some documentation describing what directives / parameters can be specified in the below two files:

    • /etc/nginx/ea-nginx/settings.json
    • /etc/nginx/ea-nginx/cache.json
    0
  • cPRex Jurassic Moderator

    Let me see if I can get more specifics from the team about this issue as I'm not finding much about this on my end. 

    0
  • cPRex Jurassic Moderator

    For http2 you'll just need to install the ea-nginx-http2 package, as that can't be enabled through a configuration.

    We actually don't have a supported way to change the "use_temp_path" option at this time, so we may need to see a feature request in order to get something implemented to handle that.  Is there a specific reason you wanted to change that value?

    0

Please sign in to leave a comment.