cPanel Wide Customization of NGINX Server Blocks
As a system administrator, I would like to be able to customize my user's NGINX directives globally rather than only individually. There are quite a few use cases where it would be desirably to add NGINX directives for all users' server blocks and not just one user at a time.
For example, cPanel does not implement Google's "best practices" for sending long "Expires" headers for static content to enable browsers to cache that content for longer periods of time. While Google's recommendation may cause unexpected issues in limited cases and thus it makes sense that cPanel has not made it the default, if knowing this, I would like to implement that as a default on my server, it'd be nice to be able to do so without having to create a conf.d/users/{USERNAME}/cache.conf file for each and every user manually.
This could be implemented simply using the same procedure cPanel handles a lot of its configuration directives in NGINX, simply adding a global server block template directory and then adding this to the standard template (where "everyUser" is the name of a directory that includes such directives):
include conf.d/everyUser/*.conf;
Replies have been locked on this page!