The difference between the root and alias commands configured by nginx on the FastDFS storage server the difference between the root and alias commands alias is the definition of a directory alias, root is the definition of the top-level directory 1 location/img/{2 alias/var/www/image/; 3} 4 # If you follow the above configuration, when you access the files in the/img/directory, ningx will automatically go to the/var/www/image/directory to find the file 5 location/img/{6 root/var/www/image; 7} 8 # if you follow this configuration, when accessing files in the/img/directory, nginx will go to the/var/www/image/img/directory to find a file. Another important difference is that "/" must be used after alias; otherwise, the file cannot be found. Root can have non-Configuration Analysis 01 server {02 listen 80; 03 server_name image1 .***. com image2 .***. com; 04 charset UTF-8; 05 location/{06 root html; 07} 08 location/image1/M00 {09 alias/data/01/; 10 ngx_fastdfs_module; 11} 12 13 location/image1/M01 {14 alias/data/02/; 15 ngx_fastdfs_module; 16} 17} url instance: http ://***. com/image1/M00/05/03/01/05/Hangzhou server:/data/03/cgaaq1f%3yiaaaaaacpr%q1saah1mqdutf8abw9d233_310x310.jpg