Page 1 of 1

NGINX Restart Failed - Files Being Cut Off

Posted: Sun Jan 24, 2016 4:07 am
by cdg
For the third time, I have received a "Nginx restart failed" message. When I tried to manually restart NGINX I am told there is an error in the user nginx.conf file. The first time this happened, it affected the nginx.conf file on two accounts on the server possibly after the aliases were changed, I thought these two incidents may have been a random error, but while changing aliases today, I received the same error.

While inspecting the nginx.conf file and consulting some experts on serverfault.com, I found that chunks of the file had been randomly removed. The first time this occurred, I was able to retype to deleted chunk, but this time it is still not fixed.

How can I fix this nginx error as I need my server back up ASAP, and how can I prevent this from happening again.

Re: NGINX Restart Failed - Files Being Cut Off

Posted: Sun Jan 24, 2016 12:31 pm
by tjebbeke
Try to 'rebuild web' for the user. https://yourcpip:8083/list/user/ select the users and in the dropdown select 'rebuild web'.

Re: NGINX Restart Failed - Files Being Cut Off

Posted: Sun Jan 24, 2016 10:41 pm
by cdg
This fixed the problem, but what caused this and how can I prevent this in the future?

Re: NGINX Restart Failed - Files Being Cut Off

Posted: Mon Jan 25, 2016 7:59 am
by tjebbeke
One of the reasons can be that you changed some config manually and later try to change the template, or the template was changed.

Re: NGINX Restart Failed - Files Being Cut Off

Posted: Mon Jan 25, 2016 8:06 am
by cdg
Its odd though, it only cuts off part of a domain's nginx config section and it never even occurred to any of the domains of which had their aliases changed