ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Fastdfs安装nginx和fastdfs-nginx-module模块后启动nginx报错

2021-02-25 11:34:41  阅读:523  来源: 互联网

标签:http -- fastdfs nginx 报错 conf root localhost


[root@localhost logs]# tail -100f error.log 
ngx_http_fastdfs_process_init pid=11255
[2021-02-24 19:11:20] ERROR - file: ../common/fdfs_http_shared.c, line: 148, param "http.mime_types_filename" not exist or is empty
2021/02/24 19:11:20 [alert] 11254#0: worker process 11255 exited with fatal code 2 and cannot be respawned
2021/02/24 19:11:41 [notice] 11262#0: signal process started
ngx_http_fastdfs_process_init pid=11263
[2021-02-24 19:11:41] ERROR - file: ../common/fdfs_http_shared.c, line: 148, param "http.mime_types_filename" not exist or is empty
2021/02/24 19:11:41 [alert] 11254#0: worker process 11263 exited with fatal code 2 and cannot be respawned

添加配置项

[root@localhost conf]# vim /etc/fdfs/mod_fastdfs.conf
#include http.conf
# Tracker 服务器IP和端口修改
tracker_server=192.168.216.133:22122
# url 中是否包含 group 名称,改为 true,包含 group
url_have_group_name = true
# 配置 Storage 信息,修改 store_path0 的信息
store_path0=/fastdfs/storager
# 其它的一般默认即可,例如
base_path=/tmp
group_name=group1
storage_server_port=23000
store_path_count=1

 

 

遇到上面的报错 将 mime.types  http.conf 文件拷贝到配置文件目录即可 :

[root@localhost fdfs]# find / -name  http.conf
/usr/local/FastDFS/conf/http.conf
[root@localhost fdfs]# cd  /usr/local/FastDFS/conf/  
[root@localhost conf]# ls -l
total 84
-rw-r--r--. 1 8980 users 23981 Feb  4  2016 anti-steal.jpg
-rw-r--r--. 1 8980 users  1461 Feb  4  2016 client.conf
-rw-r--r--. 1 8980 users   858 Feb  4  2016 http.conf
-rw-r--r--. 1 8980 users 31172 Feb  4  2016 mime.types
-rw-r--r--. 1 8980 users  7927 Feb  4  2016 storage.conf
-rw-r--r--. 1 8980 users   105 Feb  4  2016 storage_ids.conf
-rw-r--r--. 1 8980 users  7200 Feb  4  2016 tracker.conf
[root@localhost conf]# cp mime.types http.conf /etc/fdfs
[root@localhost conf]# 

检查nginx进程,worker 进程启动ok

[root@localhost sbin]# ps -ef|grep nginx
root      11254      1  0 19:11 ?        00:00:00 nginx: master process ./nginx
nobody    12044  11254  0 19:24 ?        00:00:00 nginx: worker process
root      12047  11062  0 19:24 pts/2    00:00:00 grep --color=auto nginx
[root@localhost sbin]# ./nginx -V
nginx version: nginx/1.6.3
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 
configure arguments: --prefix=/usr/local/nginx --add-module=/usr/local/fastdfs-nginx-module/src
[root@localhost sbin]# 

 

标签:http,--,fastdfs,nginx,报错,conf,root,localhost
来源: https://www.cnblogs.com/shanxia0812/p/14446002.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有