DEV Community

Cover image for How to Test Your NGINX Configuration Before Screwing it Up
Ravgeet Dhillon
Ravgeet Dhillon

Posted on • Originally published at blog.ravgeet.in

How to Test Your NGINX Configuration Before Screwing it Up

A little invalid change to your Nginx configuration can bring down your entire server. Before performing changes to the Nginx configuration, it is a safe idea to test the changes and then reload the server.

In this tutorial, you'll learn to get started ensuring you never take production down again!

Read the full blog on Adam The Automator.

Thanks for reading 💜


I publish a monthly newsletter in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I across while surfing on the web.

Connect with me through TwitterLinkedInGithub or send me an Email.

Ravgeet, Full Stack Developer and Technical Content Writer

Top comments (1)

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️
$ nginx -h
nginx version: openresty/1.19.9.1
Usage: nginx [-?hvVtTq] [-s signal] [-p prefix]
             [-e filename] [-c filename] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -T            : test configuration, dump it and exit
  -q            : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: /usr/local/openresty/nginx/)
  -e filename   : set error log file (default: logs/error.log)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file
Enter fullscreen mode Exit fullscreen mode

Reading the manual helps 😉