安装edusoho,按官方教程设置后nginx启动失败

安装edusoho,按官方教程:http://www.qiqiuyu.com/course/20/learn#lesson/794

设置后nginx启动失败。

find / -name nginx

找到nginx log目录:/var/log/nginx

找到error.log:

2015/06/19 15:14:17 [emerg] 11801#0: "sendfile" directive is duplicate in /etc/nginx/nginx.conf:76

提示sendfile重复定义,

sudo vim /etc/nginx/nginx.conf

注释掉对应行: # sendfile on;

 

修改完重启nginx还是提示fail:

查看log:

2015/06/19 15:20:14 [emerg] 11838#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32

提示应该增加选项:server_names_hash_bucket_size:32

sudo vim /etc/nginx/nginx.conf

搜索:server_names_hash_bucket_size

去掉注释:server_names_hash_bucket_size:64

重启: sudo /etc/init.d/nginx restart

启动成功!

 

 

暂无评论

发表评论

您的电子邮件地址不会被公开,必填项已用*标注。

相关推荐