nginx -t 不成功


[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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM