Fastdfs和nginx整合下载时浏览器400错误

通过查看nginx的日志文件,发现报错: ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename

itcast@itcast:/usr/local/nginx/conf$ tail -20f /usr/local/nginx/logs/error.log
[2018-12-14 22:34:53] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:54] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:54] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:54] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:54] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:58] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:59] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:34:59] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:35:00] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:35:05] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:35:06] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:35:06] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:15] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:16] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:16] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:16] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:16] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:17] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:17] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid
[2018-12-14 22:36:17] ERROR - file: …/common/fdfs_global.c, line: 52, the format of filename “group1/M00/00/00/wKgheVwTuwiAKH_pAARn1TgqZeU344.png” is invalid

进入mod_fastdfs.conf ,将
url_have_group_name=false
改为
url_have_group_name=true

itcast@itcast:/etc/fdfs$ sudo vi mod_fastdfs.conf 
itcast@itcast:/etc/fdfs$ ls
client.conf         http.conf   mod_fastdfs.conf  storage.conf.sample      tracker.conf
client.conf.sample  mime.types  storage.conf      storage_ids.conf.sample  tracker.conf.sample
itcast@itcast:/etc/fdfs$ ps -ef | grep nginx
root       6598   1868  0 22:22 ?        00:00:00 nginx: master process nginx
nobody     6705   6598  0 22:33 ?        00:00:00 nginx: worker process
nobody     6706   6598  0 22:33 ?        00:00:00 nginx: worker process
itcast     6795   6553  0 22:41 pts/0    00:00:00 grep --color=auto nginx
itcast@itcast:/etc/fdfs$ sudo nginx -s stop
ngx_http_fastdfs_set pid=6798
itcast@itcast:/etc/fdfs$ sudo nginx
ngx_http_fastdfs_set pid=6801
itcast@itcast:/etc/fdfs$ ps -ef | grep nginx
root       6802   1868  0 22:41 ?        00:00:00 nginx: master process nginx
nobody     6803   6802  0 22:41 ?        00:00:00 nginx: worker process
nobody     6804   6802  0 22:41 ?        00:00:00 nginx: worker process
itcast     6806   6553  0 22:41 pts/0    00:00:00 grep --color=auto nginx

然后刷新浏览器就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值