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 Twitter β€’ LinkedIn β€’ Github or send me an Email.

β€” Ravgeet, Full Stack Developer and Technical Content Writer

Discussion (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 πŸ˜‰