http://XXXXXX/group1/M00/00/00/eBoyzlU4kEmAZZ3EAAAGbsJr4eY979.gif  访问链接nginx.conf 配置        location /group1/M00 {
            root /home/fastdfs/data;
            ngx_fastdfs_module;
        }
mod_fast 配置
# the group name of the local storage server
group_name=group1# if the url / uri including the group name
# set to false when uri like /M00/00/00/xxx
# set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
# default value is false
url_have_group_name = true# path(disk or mount point) count, default value is 1
# must same as storage.conf
store_path_count=1# store_path#, based 0, if store_path0 not exists, it's value is base_path
# the paths must be exist
# must same as storage.conf
store_path0=/data/fastdfs
#store_path1=/home/yuqing/fastdfs1

解决方案 »

  1.   

      检查并修改mod_fastdfs.conf配置
    # cd /usr/local/src/fastdfs-nginx-module/src
    # vim mod_fastdfs.conf
      

  2.   

    # connect timeout in seconds
    # default value is 30s
    connect_timeout=2# network recv and send timeout in seconds
    # default value is 30s
    network_timeout=30# the base path to store log files
    base_path=/home/iflytek/fastdfs# if load FastDFS parameters from tracker server
    # since V1.12# FastDFS tracker_server can ocur more than once, and tracker_server format is
    # "host:port", host can be hostname or ip address
    # valid only when load_fdfs_parameters_from_tracker is true
    tracker_server=192.168.83.104:22122
    tracker_server=192.168.83.105:22122# the port of the local storage server
    # the default value is 23000
    storage_server_port=23000# the group name of the local storage server
    group_name=group1/goup2-----------------------------------------------------yao jieshi!# if the url / uri including the group name
    # set to false when uri like /M00/00/00/xxx
    # set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
    # default value is false
    url_have_group_name = true# path(disk or mount point) count, default value is 1
    # must same as storage.conf
    store_path_count=1# store_path#, based 0, if store_path0 not exists, it's value is base_path
    # the paths must be exist
    # must same as storage.conf
    store_path0=/home/iflytek/fastdfs
    #store_path1=/home/yuqing/fastdfs1
    #include http.conf(注意此处仅保留一个#)
    # set the group count
    # set to none zero to support multi-group
    # set to 0  for single group only
    # groups settings section as [group1], [group2], ..., [groupN]
    # default value is 0
    # since v1.14
    group_count =# group settings for group #1
    # since v1.14
    # when support multi-group, uncomment following section
    [group1]
    group_name=group1
    storage_server_port=23000
    store_path_count=1
    store_path0=/home/iflytek/fastdfs
    #store_path1=/home/yuqing/fastdfs1# group settings for group #2
    # since v1.14
    # when support multi-group, uncomment following section as necessary
     [group2]
    group_name=group2
    storage_server_port=23000
    store_path_count=1
    store_path0=/home/iflytek/fastdfs
      

  3.   

    #http://192.168.158.130/group1/M00/00/00/wKiegldP8u6AJ5u7AADtVgGdiYo511.jpg
    server {
            listen       80;
            server_name  192.168.158.130; 这里需要是本机(虚拟机)的IP地址
            location /group1/M00/{
             root /home/yuqing/fastdfs/data/;
                    ngx_fastdfs_module;storage.cong
    store_path0=/home/yuqing/fastdfs #文件保存路径
    mod_fastdfs.conf 配置
    store_path0=/home/yuqing/fastdfs#文件保存路径
    这是以前的帖子:http://bbs.csdn.net/topics/391960604?page=1
      

  4.   

    如果看到这个问题还没解决的。 还有一个原因可能就是权限不够
    在nginx.conf文件里加一条:user root; 就可以解决在浏览器访问url 404的问题了
      

  5.   


    在nginx.conf文件里的第一句加一条:user root; 就可以解决在浏览器访问url 404的问题了还不行就检查下你的文件存储的位置是否对