Differences between the root and alias commands configured by nginx on the FastDFSstorage server
Source: Internet
Author: User
The difference between the root and alias commands configured by nginx on the FastDFSstorage 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... 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 you access the files in the/img/directory Gparts will find the file in the/var/www/image/img/Directory. another important difference is that "/" must be used after alias; otherwise, the file cannot be found. Root can have non-configuration analysis 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
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.