NOTE: The following procedure is for TigerGraph 3.x. Please use corresponding 3.x NGINX templates below.



BACKGROUND


Updating the nginx.conf file directly is not the correct procedure as any new changes made to the file will only get reverted to its original values whenever applying new changes via 'gadmin config apply'.


In order to prevent this from happening, you will need to create an NGINX configuration template of the nginx.conf file.




PROCEDURE


1. Create a new nginx configuration template (name it nginx.conf.template) under the same location as the original nginx.conf file:

cd $(gadmin config get System.DataRoot)/configs/nginx/conf
gadmin config get Nginx.ConfigTemplate > nginx.conf.template
vim nginx.conf.template



2. Depending on which version of TigerGraph you are running (e.g. 3.1.1, 3.1.5, etc), download the relevant template that is attached to this article and save it as nginx.conf.template.


- Make necessary additions, updates, deletions to the nginx.conf.template.

- Some sample configs that can added/updated/deleted:

  • ssl_ciphers HIGH:!aNULL:!MD5;
  • ssl_protocols TLSv1.2 TLSv1.3;  
  • fastcgi_read_timeout 72000s;            //note there are two instances of fastcgi_read_timeout. update both


- Save file


3. Map location of the new NGINX configuration template:

gadmin config entry Nginx.ConfigTemplate

Enter the following value:  
@/<Tigergraph DataRoot Directory>/configs/nginx/conf/nginx.conf.template

**<Tigergraph DataRoot Directory> = $(gadmin config get System.DataRoot)**



4. Apply configuration and restart nginx:

gadmin config apply -y && gadmin restart nginx



5. Confirm that new changes are in place.

grep <whatever you added/updated> $(gadmin config get System.DataRoot)/configs/nginx/nginx.conf


New values should still be in place.