里云centOS7.4配置多个站点遇到的问题nginx: [emerg] "server" directive is not allowed here in /etc/nginx/vhost/xxxxxx.conf:2这个错误好尴尬,费了几个小时去解决,小白呀没办法 先贴下/etc/nginx/nginx.conf的内容 worker_processes 1; events { worker_connections 1024; } http { include mime.types;…
想检查一个配置文件是否正确,-c 指定之后发现有报错,如下: [root@op-2:~# nginx -t -c /etc/nginx/conf.d/default.conf nginx: [emerg] "server" directive is not allowed here in /etc/nginx/conf.d/default.conf:1 nginx: configuration file /etc/nginx/conf.d/default.conf test faile…