项目场景:
用Nginx配htts服务时发现的错误
问题描述
跟着博客搭建过程,重启Nginx后,后台出现的一个错误
docker安装Nginx详细教程和基本配置 - 掘金 (juejin.cn)
server" directive is not allowed here in /etc/nginx/nginx.conf:34
顺便说一下设置行号的命令:set nu
原因分析:
service部分应该是包含在http{}的模块内的
解决方案:
将server里的内容移到http里面去即可解决