Why does it not take effect to set up a virtual directory in nginx?

nginx version: 1.12.1
nginx virtual host configuration is as follows:

server{
    listen 80;
    server_name abc.local;
    index index.html index.htm index.php;
    root  /opt/tool/web;
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }
    location /test {            
        alias /opt/tool/web/cdn/;
    }
    location = /robots.txt {
        allow all;
        log_not_found off;
         access_log off;
    }
    include enable-php.conf;
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
          expires      30d;
    }

    location ~ .*\.(js|css)?$ {
          expires      12h;
    }

    access_log off;
}

this configuration file is in the servers directory
nginx.conf through

include servers/*;

introduce.
visit. http://abc.local/test/1.jpg
appears
View nginx error log

[error] 36523-sharp0: *63 open() "/opt/tool/web/test/1.jpg" failed (2: No such file or directory), client: 127.0.0.1, server: abc.local, request: "GET /test/1.jpg HTTP/1.1", host: "abc.local"

I set yes
/ opt/tool/web/cdn/
in the virtual directory test. Why doesn"t it work, and why does he have to visit the root / opt/tool/web directory?

Mar.06,2021

clipboard.png

A picture can be seen

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3c60f-2c313.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3c60f-2c313.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?