nginx: [emerg] unexpected end of file, expecting ";" or "}" in /usr/local/nginx/conf/nginx.conf:118
[root@localhost sbin]# vim /usr/local/nginx/conf/nginx.conf
[root@localhost sbin]# ./nginx -s reload
nginx: [emerg] directive "index" is not terminated by ";" in /usr/local/nginx/conf/vhost/www.baidu.com.conf:7
[root@localhost sbin]# vim /usr/local/nginx/conf/vhost/www.baidu.com.conf
[root@localhost sbin]# systemctl start tomcat
[root@localhost sbin]# ./nginx -s reload
nginx: [emerg] directive "index" is not terminated by ";" in /usr/local/nginx/conf/vhost/www.baidu.com.conf:7
[root@localhost sbin]# vim /usr/local/nginx/conf/vhost/www.baidu.com.conf
基本上是一些"{ } ;"符号漏了或者多写了,vim命令定位到报错的行,修改即可,中途误改按u恢复,centos7在你修改后启动不了的情况下做了备份,重新编辑,会提示恢复,输入命令:r 恢复继续编辑。