网站首页 > 技术文章 正文
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 (64)
- c++中::是什么意思 (83)
- 标签用于 (65)
- 主键只能有一个吗 (66)
- c#console.writeline不显示 (75)
- pythoncase语句 (81)
- es6includes (73)
- sqlset (64)
- windowsscripthost (67)
- apt-getinstall-y (86)
- node_modules怎么生成 (76)
- chromepost (65)
- c++int转char (75)
- static函数和普通函数 (76)
- el-date-picker开始日期早于结束日期 (70)
- localstorage.removeitem (74)
- vector线程安全吗 (70)
- & (66)
- java (73)
- js数组插入 (83)
- linux删除一个文件夹 (65)
- mac安装java (72)
- eacces (67)
- 查看mysql是否启动 (70)
- 无效的列索引 (74)