前沿

今天在其他服务器上重新配置 nginx.conf 文件,配置结束启动 nginx 发现遇到了这样一个错误,我擦…?我配置文件都是从上个服务器上 复制粘贴过来的,怎么会遇到这个问题呢?百思不得其解,最终在网上百度了一下,得到了解决方案。

一、问题

 "server" directive is not allowed here in /etc/nginx/nginx.conf:69

二、原因

三、结论

配置信息里边 多加了一个 大括号
应该是:
http
{server{}
}

四、解决方案

后记

虽然是一个小小的问题,防止以后踩坑,这里记录一下。

Nginx 配置问题 server directive is not allowed here in /etc/nginx/nginx.conf:69相关推荐

  1. 哎呦报错啦怎么办?nginx: [emerg] “server“ directive is not allowed here in /usr/local/nginx/conf/nginx.conf53

    报错怎么办?不要慌,排它! 1.具体报错提示信息 nginx: [emerg] "server" directive is not allowed here in /usr/loc ...

  2. nginx: [emerg] “location“ directive is not allowed here in /usr/local/nginx/conf/nginx.conf:72

    做LNMP实验中的PHP设置完测试页面重启nginx时发现重不不成用nginx -t检测说如下原因 nginx: [emerg] "location" directive is n ...

  3. nginx: [emerg] “location“ directive is not allowed here

    nginx配置出错. D:\nginx>nginx.exe -t nginx: [emerg] "location" directive is not allowed her ...

  4. 解决nginx: [emerg] “ssl“ directive is not allowed here in /etc/nginx/conf.d/xxx.conf:5

    精品好文推荐: 部署nginx为自定义服务做代理转发并实现密码认证登录 报错时的情况: 最后发现是位置不对,把ssl的配置移到location之外就OK!

  5. 【Nginx】错误: [emerg] “proxy_set_header“ directive is not allowed here in D:\sde\phpstudy_pro\...

    前言 nginx 1.15.11(下面的代码在此版本测试通过) win10 phpstudy 8.1.1.3 错误 nginx: [emerg] "proxy_set_header" ...

  6. Nginx:[emerg] unknown directive “server” in*******

    Nginx:[emerg] unknown directive "server" in******* 今天在Window 下用记事本 编辑 了nginx.conf 文件后保存.启动 ...

  7. Nginx 启动报错 directive is not allowed here in

    问题场景 Linux 系统中, Nginx 安装包中默认提供了 conf 文件夹,并且自带的 nginx.conf 配置文件中默认 include 该文件夹下的配置文章. 笔者本次使用 Windows ...

  8. 记一次NGINX配置问题

    项目场景: 安装nginx后给nginx.conf配置HTTPS 问题描述: 验证配置是否正确时:./nginx -t 报错 错误:nginx: [emerg] unknown directive & ...

  9. nginx: [emerg] unknown directive “stub_status“ in /app/nginx/conf/conf.d/state.conf:7

    文章目录 一 发现问题 二 解决问题 1)找到编译安装时的nginx软件包,解压 2)配置相关参数 3)编译,安装 4)创建软链接和环境变量 5)确保配置文件正确 6)查看nginx进程 7)发送US ...

最新文章

  1. windows-vscode编写c/c++(适用日期2020-5月的vscode)--简洁版(下载gdb.exe)
  2. 敏捷实践:比每日会议更疯狂的半日会议!
  3. Mac清理软件为苹果系统迅速减压
  4. 《Python神经网络编程》
  5. [ACL18]基于Self-Attentive的成分句法分析
  6. nginx1.02+php+piwik+centos5.4构建网站统计系统
  7. 判断文件中字符是否存在_使用Python库判断字符是否在字体里
  8. paip.java-asp-php-.net互相调用方法大总结
  9. 各类常用软件汇总【转载冰封工作室】
  10. Vultr与阿里云结合自动换IP的解决方案
  11. 等保2.0测评综合得分计算
  12. 前端导出excel自定义样式(行高除外)
  13. 数控铣削图案及编程_数控铣床编程30例带图 急!!数控编程实例 带图案的
  14. pycharm 配置 interpreter
  15. 基于springboot企业客户信息反馈平台设计与实现的源码+文档
  16. windows 系统密码破解工具(适合各种版本windows)
  17. 线性模型出现非正定矩阵的问题解释
  18. Redis使用验证码
  19. 促进高校内涵发展教学质量提高数码钢琴实训室建设方案
  20. windows开启ftp服务器

热门文章

  1. 软件验证计划简化版模板
  2. CF1293E Xenon‘s Attack on the Gangs
  3. 美团餐饮SaaS基于StarRocks构建商家数据中台的探索
  4. 生活随记-公平和本分
  5. 利用子集构造法实现NFA到DFA的转换
  6. curl调用接口方法
  7. Reggie外卖项目 —— 项目开发整体介绍
  8. 安卓基础巩固(二):四大组件:Activity、Service、Broadcast、Content Provider
  9. SQL Server 2005 版本介绍及所谓“企业管理器”问题
  10. Lumerical Mode FDE 碰到的错误整理【整理中】