Service NGINX Restart Fail

Linux, NGINX, Ubuntu, 2016-02-21 00:28:03 UTC

This problem may occur because you misspelled configuration on /etc/nginx/nginx.conf.

When you type command $ sudo service nginx restart and the terminal response is fail

To investigate this problem, you need to run;

$ sudo nginx -t

Now you now where the error is. 

 

And to see what command is available, you can type;

$ nginx -h
nginx version: nginx/1.8.0
Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration 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/share/nginx/)
  -c filename   : set configuration file (default: /etc/nginx/nginx.conf)
  -g directives : set global directives out of configuration file

:)


Share: