Using custom global templates with Nginx


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » CustomBuild » CustomBuild 2.0 » Nginx

Using custom global templates with NginxLast Modified: Jul 31, 2014, 1:23 am
This guide will describe how to setup customized global per-User/Domain templates, so you nginx server configurations can be changed however you need.    Note that this guide is a mirror of the similar guide for Apache.

Copy the templates to the custom area:

cd /usr/local/directadmin/data/templates/custom
cp ../nginx_*.conf .

There are many templates for nginx, so if there are any that you don't need to change, you can delete the from the custom folder, and the defaults will be used.  Templates in the custom folder override the default templates.

The rest of the change are very similar to the Apache guide and share essentially the same TOKENS.   If you want to see all tokens that you have to work with, you can use the |DUMPTOKENS| token in the nginx conf file and issue a rewrite, and it will add all tokens and their values to your configs.  Of course, this won't be syntactically valid, but it will let you see what you can work with.

When you want to issue a rewrite to try your new configs, type:

cd /usr/local/directadmin/custombuild
./build rewrite_confs


 
Related Helpfiles
Using a custom VirtualHost template

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST