- 论坛徽章:
- 0
|
文件服务器是fastdfs+nginx+keepalived这三种搭建的。
keepalived配置一个虚拟ip为192.168.1.98
fastdfs已配置防盗链(修改http.conf文件),配置如下:
# HTTP default content type
http.default_content_type = application/octet-stream
# MIME types mapping filename
# MIME types file format: MIME_type extensions
# such as: image/jpeg jpeg jpg jpe
# you can use apache's MIME file: mime.types
http.mime_types_filename=mime.types
# 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
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 of the secret key should not exceed 128 bytes
http.anti_steal.secret_key=FastDFS1234567890
# return the content of the file when check token fail
# default value is empty (no file sepecified)
http.anti_steal.token_check_fail=/tmp/erro.jpg
如果浏览器访问,后面没有加taken与ts两个参数,图片正常显示,防盗链没有起作用。。
求大神帮忙,谢谢~
|
|