1 装好fastdfs后,进行上传文件测试,遇到如下错误
ERROR - file: ../common/fdfs_global.c, line:52, the format of filename "group1/M00/00/00/wKgAA1cLh12AI0kfAAAADzbdjmQ50_big.html"is invalid
原因:nginx的fdfs的MOD里面默认没有开启url_have_group_name,默认为false
修复:开启mod_fastdfs.conf文件中的url_have_group_name选项,后重启nginx
# 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
2 没有M00,要手动建软链接
ln -s /data/fdfs/storage/data /data/fdfs/storage/data/M00
注意是-s,不是-S(大写)
3 nginx已经成功安装了fastdfs的模块了,跑起来就是没有worker进程,所以外面访问不了
解决:只拷贝mod_fastdfs.conf不行,还得拷贝mime.types,然后重启nginx
网友评论