解压安装过程命令如下: cd /home/oscf #该目录下有nginx压缩包 mkdir nginx tar -zxvf nginx-1.16.0.tar.gz cd nginx-1.16.0 ./configure --prefix=/home/oscf/nginx #指定安装目录 make make install 当执行最后一步 make install 时,报错 nginx: [emerg] unknown directive "stub_status" in /home…
里云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…