由于近期外包团队反应我们部署的FastDFS不能公网访问,折腾了三天,上网查资料仍无果,最终自己的灵机一动问题解决了,具体过程不说了(说多了都是眼泪),直接上所有配置文件。

vim /etc/fdfs/tracker.conf

http.server_port = 8080
use_storage_id = false

vim /etc/fdfs/storage.conf

http.server_port = 8888
tracker_server = 公网IP:22122

vim /etc/fdfs/storage_ids.conf

100001 group1 公网IP
vim /etc/fdfs/mod_fastdfs.conf

use_storage_id = false
tracker_server = 公网地址:22122

vim /etc/fdfs/client.conf

use_storage_id = false
http.tracker_server_port = 80
tracker_server = 内网地址:22122

vim /fastdfs/storage/data/.data_init_flag

last_ip_addr = 内网IP
last_server_port = 23000
last_http_port = 8888

vim /fastdfs/tracker/data/storage_sync_timestamp.dat

group1,内网地址,0,0
group1,公网IP,0,0