[root@web01 conf.d]# nginx -t
nginx: [emerg] invalid number of arguments in "root" directive in /etc/nginx/conf.d/text.conf:7
nginx: configuration file /etc/nginx/nginx.conf test failed
当用nginx -t 查看时报错 以为是配置文件配置错误,检查后配置没有问题,想起来自己还创建了一个以.conf的文件,使用rm -f 删除
[root@web01 conf.d]# rm -r text.conf
rm: remove regular file ‘text.conf’? yes
[root@web01 conf.d]# ll
total 4
-rw-r--r-- 1 root root 137 Jan 9 21:26 game.conf
[root@web01 conf.d]# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful