FastDFS_v4.06 + nginx-1.4.2 configuration details during the past few days to play FastDFS, while amazed at the large cattle while also sincerely thanks to the sharing of fish big. Some simple records have been made for the configuration of Nginx + FastDFS, hoping to help those who will learn about it later. I also hope that Yu Da and other friends who have studied this article will give more corrections. The specific steps are as follows: 1. Install FastDFS (I installed the latest FastDFS_v4.06). The installation steps will not be repeated here. 2, install Nginx (I installed version is: nginx-1.4.2), can be directly installed by the root user by default, I am not a root user specified directory compilation and installation: installation) 2) decompress: # tar zxvf nginx-1.4.2.tar.gz # tar zxvf pcre-8.33.tar.gz # tar zxvf zlib-1.2.8.tar.gz 3) Compile and install # cd nginx-1.4.2 #. /configure -- prefix =/webapp/nginx -- with-pcre =/webapp/tools/pcre-8.33 -- with-zlib =/webapps/tools/zlib-1.2.8 # make install 4) modify nginx. con F configuration file, start nginx verify whether installation is successful 3, Nginx add Module 1) download the installation package (I use a fastdfs-nginx-module_v1.15) 2) unzip: tar xzf fastdfs-nginx-module_v1.15.tar.gz 3) compile and install (Nginx installation source directory, that is, the nginx-1.4.2 extract directory ):#. /configure -- prefix =/webapp/nginx -- add-module =/webapp/tools/fastdfs-nginx-module/src -- with-pcre =/webapp/tools/pcre-8.33 --- zlib =/webapp/tools/zlib-1.2.8 # make install description: if you want to modify the path of the mod_fastdfs.conf file, you need to modify-DFDFS In the conf configuration file before installation. _ MOD_CONF_FILENAME = '\ "/etc/fdfs/mod_fastdfs.conf \"' "4. modify the configuration file 1) nginx. add configuration in server for conf: the access path does not contain the group name (only one group is stored in storage), for example,/M00/00/00/xxx: location/M00 {ngx_fastdfs_module ;} the access path includes the group name (where the storage pair should have multiple groups), for example,/group1/M00/00/00/xxx: location ~ /Group ([0-9])/M00 {ngx_fastdfs_module;} 2) mod_fastdfs.conf copy mod_fastdfs.conf under the fastdfs-nginx-module/src directory to the directory configured by-DFDFS_MOD_CONF_FILENAME, for example,/etc/fdfs /. Modify the configuration: tracker_server = 192.168.1.241: 22122 -- the ip address and port of the tracker server. Here, you can write multiple tracker servers. Each line has one url_have_group_name = true -- true when the access path has a group; otherwise, false, if multiple groups exist, the value must be true. If the value is false, group_count must be 0 and only one group is stored: group = group1 -- the group store_path0 corresponding to storage =/webapp/fastdfs/storage -- storage path group_count = 0 storage should have multiple groups: url_have_group_name = true -- must be set to true to support multiple groups group_count = 2 -- st Orage group count [group1] group_name = group1 storage_server_port = 23000 store_path_count = 1 store_path0 =/webapp/fastdfs/storage [group2] group_name = group2 records = 23000 store_path_count = 1 store_path0 =/webapp /fastdfs/storage2 5. Restart Nginx, verify.