nginx: [emerg] open() "/etc/nginx/nginx.conf" failed (2: No such file or directory)错误解决
[重要通告]如您遇疑难杂症,本站支持知识付费业务,扫右边二维码加博主微信,可节省您宝贵时间哦!
大晚上测试一程序的时候,一直提示错误,具体错误如下;不过遵循百度搜索以及自己琢磨的法则,找到了如下方式方法,具体请看;
错误提示:
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
根据提示去看有没有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
发现文件加了个bak后缀,应该是安装失败我强制停止再重新安装的时候导致的,把bak去掉后再试:
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~
问题未解决?付费解决问题加Q或微信 2589053300 (即Q号又微信号)右上方扫一扫可加博主微信
所写所说,是心之所感,思之所悟,行之所得;文当无敷衍,落笔求简洁。 以所舍,求所获;有所依,方所成!