[emerg] "server" directive is not allowed here in /usr/local/nginx/conf/vhost/www.imooc.com.conf:1
提示这个
以下是配置文件,请各位帮忙看看是怎么回事。
server {
listen 80;
autoindex on;
server_name www.imooc.com;
access_log /usr/local/nginx/logs/access.log combined;
index index.html index.htm index.jsp index.php;
#error_page 404 /404.html;
if ( $query_string ~* ".*[\;'\<\>].*" ){
return 404;
}
location / {
proxy_pass http://127.0.0.1:8080;
add_header Access-Control-Allow-Origin '*';
}
}