Check Errors in Nginx Configuration File on Ubuntu

Check Errors in Nginx Configuration File on Ubuntu

Nginx web server can fail to start if the configuration file contains errors. If any changes were made in a configuration file, it is recommended to check whether syntax is correct before restarting Nginx. This tutorial explains how to check errors in Nginx configuration file on Ubuntu.

To test the Nginx configuration file, run the following command:

sudo nginx -t

The command prints syntax is ok or information about the particular syntax error.

The 1 Comment Found

  1. Avatar
    Guillermo Caulfield Reply

    Dear lindevs.com administrator, Your posts are always well-supported by research and data.

Leave a Comment

Cancel reply

Your email address will not be published.