这种情况是由于events的位置不对造成的
正确的格式是:

events {#你的代码
}
http{upstream django {#你的代码}server {#你的代码}
}

nginx: [emerg] events directive is not allowed here in /opt/myapi/nginx.conf:XX相关推荐

  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中配置gzip_static on提示nginx: [emerg] unknown directive “gzip_static“ in

    通过nginx配置开启解压缩静态文件gzip_static on后,启动nginx会提示nginx: [emerg] unknown directive "gzip_static" ...

  7. 问题解决:“nginx: [emerg] unknown directive “ “ in /etc/nginx/conf.d/XXX.conf:122”

    nginx: [emerg] unknown directive " " in /etc/nginx/conf.d/XXX.conf:122 总结: 该问题为文本从Windows中 ...

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

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

  9. Nginx配置SSL证书时——nginx:[emerg]unknown directive ssl错误

    一.引言 当我们的Linux服务器上当中发布了web项目,有时候需要配置一个SSL证书,这样表示你这个网站还比较正式哈哈哈.当我把证书下载好,把nginx.conf配置好,简直就是万事俱备,只欠重启. ...

  10. nginx: [emerg] unknown directive ssl  Nginx配置SSL报错

    配置环境: nginx:1.8.0版本 CentOS: 6.8版本 问题描述: 本人是在使用nginx 访问方式由http转成https过程中出现的以下问题,参考的是该博文完美解决,大家有什么问题可以 ...

最新文章

  1. ARM汇编:乘法指令集
  2. Web前端-JavaScript基础教程上
  3. 知识点 - python 类的私有/保护 属性和方法
  4. 【报错笔记】程序报错:Cause: java.sql.SQLException: Invalid value for getInt() - ‘4ab72edc-c02f-423f-ae9e-18c30
  5. DEDECMS 5.6整合Discuz_X1.5的方法
  6. php无限极,php实现无限极分类 - MyClassPHP-Colin主页 - OSCHINA - 中文开源技术交流社区...
  7. flask mysql项目模板渲染_Flask系列(二) 模板 templates
  8. android 系统搜索框(有浏览记录),Android 系统有浏览记录搜索框
  9. merge规则 python_用Python处理PDF
  10. js计算两个整数之间的百分比
  11. 冰点还原离线激活_冰点还原密钥,小编告诉你如何激活冰点还原
  12. html5辨别音高,音理知识基础:音高和时值
  13. WebMagic爬取小说网站所有小说
  14. 2021潞河中学内高班高考成绩查询,潞河中学2018小升初入学攻略(含入学途径、中高考成绩)...
  15. 怎样清空微信全部聊天记录?轻松几步!如何操作清除微信聊天记录?
  16. 一搜◎欢乐搜索 变相滋生垃圾邮件与病毒
  17. linux stat获取文件大小,Linux查看文件大小的几种方法示例 stat du ls awk (转)
  18. 长期稳定短视频去水印微信小程序源码
  19. ESP32/ESP32S3模组在使用Touchpad例子发生flash出错问题解决方式
  20. AI医药论文笔记--GraphDTA: Predicting drug–target binding affinity with graph neural networks

热门文章

  1. 修改bios密码 服务器,为BIOS设置密码让我们的系统更加安全
  2. Spark 小文件合并优化实践
  3. android自己监听home键,Android中监听Home键的4种方法总结
  4. mysql数据库,语法语句总结。以及事务理解-基础篇
  5. Windows Xp SP3 chs 简体中文版下载
  6. 国家级精品课程 电子资源 网址
  7. python文件seek函数_Python seek函数
  8. buuctf easyphp
  9. 力扣438题找到字符串中所有字母异位词
  10. 飞秋2013正式版有偿修改在线等