nginx - 1#1:此处不允许使用“事件”指令
问题描述
当我启动我的 docker-compose 时,我在控制台中看到了这个。如何解决这个问题?
[emerg] 1#1: "events" directive is not allowed here in /etc/nginx/conf.d/nginx.conf:3
nginx.conf
events {}
http {
server {
listen 80;
location / {
proxy_pass http://kinomonster:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static/ {
alias /static/;
}
}
}
解决方案
推荐阅读
- javascript - 在图标选择上显示文本选择了多少个图标
- selenium-webdriver - 如何使用数据生成器运行 TestNG.xml
- r - 分隔具有不同长度的行值并删除其中一个值
- google-sheets - 谷歌表格查询计数返回“计数”而不是数值
- angular - 如何在实用程序类中注入 ng-bootstrap NgbDateParserFormatter
- dependency-injection - 无法在 webapi 控制器中使用 Unity.AspNet.Mvc 解决依赖关系
- css - 具有自适应宽度的网格状容器
- css - 如何在 CSS 动画中制作平滑曲线/旋转
- css - 如何使按钮水平排列?
- coq - 如何在 ltac 中使用类型参数?