Page 1 of 1

nginx: [emerg] unexpected "}"

Posted: Wed Jan 17, 2018 2:44 am
by dickbutt
nginx: [emerg] unexpected "}" After adding a new domain this happen and nginx cant start unless i remove the domain.

Re: nginx: [emerg] unexpected "}"

Posted: Wed Jan 17, 2018 3:12 am
by dickbutt
So this is odd because i never edited my default.tpl files and this is what i came across

location /vstats/ {
alias %home%/%user%/web/%domain%/stats/;
include %home%/%user%/conf/web/%domain%.auth <- See.. what is missing is this *; // Updated the tpl and stpl files and added that and it worked fine
}

Any idea how this happen ?

Re: nginx: [emerg] unexpected "}"

Posted: Wed Jan 17, 2018 6:16 am
by ScIT
template files will not beeing toiched, also not by a vesta uodate. so no, i think there is no answer for your question.

Re: nginx: [emerg] unexpected "}"

Posted: Wed Jan 17, 2018 5:21 pm
by pramathesh
Even I've this error. I changed nothing at my end just restarted my server and this is the error I am getting

Re: nginx: [emerg] unexpected "}"

Posted: Wed Jan 17, 2018 6:43 pm
by Gordon55M
I was having the same issue. Every time I updated the server I got the NGINX } error. Here is what I did to fix the issue:

Download the VestaCP Install from https://github.com/serghey-rodin/vesta/ ... master.zip

Unzip the contents of the zip file to your desktop and navigate to the correct folder for the template files:

Example:

Ubuntu 16.04 = \vesta-master\vesta-master\install\ubuntu\16.04\templates\web\nginx\php-fpm
or
Rhel/CentOS 6 = \vesta-master\vesta-master\install\rhel\6\templates\web\nginx\php-fpm

On your server that has VestaCP installed, replace the contents of the directory:

/usr/local/vesta/data/templates/web/nginx/php-fpm

With that from the zip file. Run an update, and NGINX should restart without issue. Of course, backup files before you try this. I did this on Ubuntu 16.04 without issue.

Re: nginx: [emerg] unexpected "}"

Posted: Fri Jan 19, 2018 11:45 pm
by noogen
Yes, this is a nginx config parsing issue which is fixed in the latest version per Gordon55M suggestion. Please update to v18 or directly from source for the fix. You may have to rebuild the user. Oh, and always backup first before upgrade.

ref: https://github.com/serghey-rodin/vesta/issues/1447

Re: nginx: [emerg] unexpected "}"

Posted: Mon Feb 26, 2018 11:51 am
by lukeseven
Hi,

thank you Gordon55M. You are a life saver.

I was going crazy but now all is sorted thanks to your suggestion.

Your solution worked like a charm.

Thanks again

Re: nginx: [emerg] unexpected "}"

Posted: Fri Apr 06, 2018 4:39 am
by jesusjvc
thanks for solution