FastDFS从4.05版本开始去除了内置HTTP,估计也是为了安全考虑,通过查看GitHub上的HISTORY可以看到最后一点“* remove embed HTTP support”
Version 4.05 2012-12-30
* client/fdfs_upload_file.c can specify storage ip port and store path index
* add connection pool
* client load storage ids config
* common/ini_file_reader.c does NOT call chdir
* keep the mtime of file same
* use g_current_time instead of call time function
* remove embed HTTP support
但是我们为了能够集群访问,配置了Nginx,为了防止外泄文件信息,就需要添加防盗链
修改配置sudo vim /etc/fdfs/http.conf
# if use token to anti-steal
# default value is false (0)
# 开启防盗链
http.anti_steal.check_token=true
# token TTL (time to live), seconds
# default value is 600
# token过期时间(单位:秒),根据需要修改
http.anti_steal.token_ttl=900
# secret key to generate anti-steal token
# this parameter must be set when http.anti_steal.check_token set to true
# the length