nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)錯(cuò)誤解決
[重要通告]如您遇疑難雜癥,本站支持知識(shí)付費(fèi)業(yè)務(wù),掃右邊二維碼加博主微信,可節(jié)省您寶貴時(shí)間哦!
大晚上測試一程序的時(shí)候,一直提示錯(cuò)誤,具體錯(cuò)誤如下;不過遵循百度搜索以及自己琢磨的法則,找到了如下方式方法,具體請看;
錯(cuò)誤提示:
root@OpenWrt:/usr/sbin# ./nginx -t
nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)
nginx: configuration file /etc/nginx/nginx.conf test failed
根據(jù)提示去看有沒有nginx.conf文件:
root@OpenWrt:/etc# cd nginx/
root@OpenWrt:/etc/nginx# ls
fastcgi_params_bak koi-utf koi-win mime.types nginx.conf_bak win-utf
root@OpenWrt:/etc/nginx# cp nginx.conf_bak nginx.conf
root@OpenWrt:/etc/nginx# cp fastcgi_params_bak fastcgi_params
發(fā)現(xiàn)文件加了個(gè)bak后綴,應(yīng)該是安裝失敗我強(qiáng)制停止再重新安裝的時(shí)候?qū)е碌模裝ak去掉后再試:
root@OpenWrt:/usr/sbin# ./nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
nginx successful~
問題未解決?付費(fèi)解決問題加Q或微信 2589053300 (即Q號(hào)又微信號(hào))右上方掃一掃可加博主微信
所寫所說,是心之所感,思之所悟,行之所得;文當(dāng)無敷衍,落筆求簡潔。 以所舍,求所獲;有所依,方所成!