Nginx Tutorials: Basic commands

These are the basic commands you use to interact with your NGINX instance.

Check NGINX version:

$ nginx -v                  /* prints the version of nginx */

Check configuration file syntax before reloading:

$ nginx -t                  /* validates the syntax to ensure that there are no issues with the configuration you're about to push */

Display current configurations:

$ nginx -T                  /* gives you the configuration which is currently implemented in your instance of nginx */

Reload NGINX

$ nginx -s reload           /* takes the configuration and pushes it out to the existing instance */
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x