错误如下:
nginx: [emerg] "server"指令在/usr/local/nginx/conf/ 1中是不允许的
[root@localhostsbin]# ./nginx -t
nginx: [emerg] "server"指令在/usr/local/nginx/conf/ 1中是不允许的
nginx:配置文件/usr/local/nginx/conf/nginx。配置测试失败
配置文件是:
server {
listen 80;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
server
配置需要放在 http
配置之中
http {
server {
}
}
谢谢嘟嘟哥