问题1 :nginx: [emerg] "server" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:1
nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed
解决方法:server 标签需要在 http的标签内
正确的配置写法 : http {undefined
server {}
}
问题2: nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"