Thursday, April 25, 2024
 Popular · Latest · Hot · Upcoming
159
rated 0 times [  159] [ 0]  / answers: 1 / hits: 221379  / 2 Years ago, mon, april 11, 2022, 2:25:58

Hi I've had my Nginx server running great on Ubuntu server 12.04 for a while.



I've been gradually bolting on various bits, and got as far as optimising load times on my wordpress page.



After making a few changes to my hosts file I decided to:



sudo /etc/init.d/nginx reload


To which I get:



* Reloading nginx configuration nginx                           [fail]


No additional info or reasoning is given. How can I restart my server so that it prints any error statements whilst reloading so I can begin to track down the error.



For a bonus question:



For those Nginx sysadmins, when you've made a bunch of changes to hosts and bolted on a few other bits and suddenly your nginx server won't reload (incidentally everything still appears to be running!) how do you begin your approach to isolating why or begin breaking things down to debug!


More From » server

 Answers
2

Check syslog (/var/log/syslog) for messages about config file issues.



From the commandline you can run:



nginx -c /etc/nginx/nginx.conf -t


to have nginx check your configuration for errors.


[#26182] Monday, April 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
fieldcheon questions
Fri, Apr 1, 22, 05:58, 2 Years ago
Wed, Feb 2, 22, 03:31, 2 Years ago
Sat, Aug 14, 21, 01:24, 3 Years ago
;