Working with Nginx config files

Submitted by admin on Sun, 01/06/2019 - 13:41

To update templates:

echo "action=rewrite&value=nginx" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d

 

To copy template files and rewrite them as we want

mkdir -p /usr/local/directadmin/data/templates/custom/ 
cp /usr/local/directadmin/data/templates/nginx_server.conf /usr/local/directadmin/data/templates/custom/nginx_server.conf

 

to check syntax of config file:

ngnix -t

 

 

 

good link to build a config file for Nginx:

https://nginxconfig.io/