求大手子解答,配置个简单的nginx网站,配置完文件访问不了,配置文件没有报错

#user www www;
worker_processes 1;

events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;

##2014 config nginx

server {
    listen       80;
    server_name  www.waer1.com;
    location / {
        root   html/a;
        index  index.html index.htm;
    }
 }

 server {
    listen       80;
    server_name  www.waer2.com;
    location / {
       root   html/b;
        index  index.html index.htm;
    }
}

}
"nginx.conf" 33L, 619C 已写入
[root@jiaqi002 conf]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@jiaqi002 conf]# /usr/local/nginx/sbin/nginx -s reload

img

https://blog.csdn.net/heisejingyu/article/details/126583416?spm=1001.2014.3001.5502 可以看看这个

root后面要跟全路径,不要跟相对路径