It is possible to add custom NGINX directives without directly modifying our NGINX configuration files.
You can place your directives in any of the following folders:
Directives in the/etc/nginx/userconfigs/http folder are included in our configs in the http block.
Directives in the /etc/nginx/userconfigs/server folder are included close to the top of the server block for each individual site.
Directives in the /etc/nginx/userconfigs/site folder are included close to the bottom of the server block for each individual site. However, in this case, only files that are prefixed with the domain name are included. The include statement we use for this is:
After adding files to those folders, don’t forget to restart NGINX to activate the new settings.
service nginx restart