网站首页 > 技术文章 正文
nginx: [emerg] invalid number of arguments in "root" directive in /usr/local/nginx/conf/nginx.conf:20
错误原因:配置文件第20行报错
输入命令再次检查:配置文件信息:
在sbin目录下
输入nginx -t
nginx: [emerg] invalid number of arguments in "root" directive in /usr/local/nginx/conf/nginx.conf:20
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
确定了配置文件有问题
找到配置文件
发现20行上面19行 少一个分号;
问题找到,添加分号后,保存成功.再检查配置文件nginx -t
重启nginx
重启命令./nginx 或者重新加载启动
...nginx/sbin/nginx -c .../nginx/sbin/conf/nginx.conf
目录下的以及子目录下的所有执行权限可读可写可操作权限chmod 777 -R ./html或者 chmod -R u+x ./html
猜你喜欢
- 2024-10-20 高效访问海量地图数据--GeoServer手动发布本地Shapefile地图
- 2024-10-20 详解grafana常见报错internal server error如何解决
- 2024-10-20 python教程之FTP相关操作(python2 ftp)
- 2024-10-20 僵尸毁灭工程联机教程 僵尸毁灭工程联机服务器设置
- 2024-10-20 tftp为何timeout?为何server error:(1)File not found
- 2024-10-20 MySQL server PID file could not be found!失败
- 2024-10-20 esp8266_server 的 streamFile 方法
- 2024-10-20 Java IO之字节流详解,文件字节输出流,文件字节输入流
- 2024-10-20 SQL server 2008 R2 图文安装教程(附资源)
- 2024-10-20 GET!无法连接数据库,SOLIDWORKS Electrical解决方法
- 最近发表
- 标签列表
-
- cmd/c (90)
- c++中::是什么意思 (84)
- 标签用于 (71)
- 主键只能有一个吗 (77)
- c#console.writeline不显示 (95)
- pythoncase语句 (88)
- es6includes (74)
- sqlset (76)
- apt-getinstall-y (100)
- node_modules怎么生成 (87)
- chromepost (71)
- flexdirection (73)
- c++int转char (80)
- mysqlany_value (79)
- static函数和普通函数 (84)
- el-date-picker开始日期早于结束日期 (76)
- js判断是否是json字符串 (75)
- c语言min函数头文件 (77)
- asynccallback (87)
- localstorage.removeitem (74)
- vector线程安全吗 (70)
- java (73)
- js数组插入 (83)
- mac安装java (72)
- 无效的列索引 (74)