nginx启动fastdfs时,报unknown directive "ngx_fastdfs_module"

sandy 发表于: 2019-12-30   最后更新时间: 2019-12-30 16:44:44   7,734 游览

我照着教程,添加了fastdfs模块,但是一直不成功,看了一下nginx-errors.log:

2019/12/30 10:44:52 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:30
2019/12/30 10:48:16 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:30
2019/12/30 10:51:46 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:30
2019/12/30 11:05:50 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:30
2019/12/30 11:11:30 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:31
2019/12/30 12:31:30 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:31
2019/12/30 12:37:28 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:31
2019/12/30 13:50:38 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:31
2019/12/30 14:22:34 [emerg] 6399#0: unknown directive "ngx_fastdfs_module" in /opt/nginx/conf/sites-enabled/ip.conf:31

发现了以上错误,请问该怎么解决?

发表于 2019-12-30
¥1.0

要重启 nginx。记住,一定要重启 nginx

systemctl restart nginx

如果只是重新加载 nginx.conf 文件nginx -s reload是不行的。

sandy -> 無名 4年前

感谢,重启后就好了,亏我检查了好几遍配置!

你的答案

查看FastDFS相关的其他问题或提一个您自己的问题