容器技术交流

 找回密码
 立即注册
查看: 13678|回复: 6

重启服务器后,网站打不开了怎么办?

[复制链接]
发表于 2013-1-3 10:39:18 | 显示全部楼层 |阅读模式
重启服务器后,可以进LUM后台,但是Nginx 没有启动,重启Nginx 出现下面提示怎么办?

操作成功
Shutting down php_fpm Starting php_fpm done nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 128 nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 128
Nginx重启失败! Nginx was restarted failed.

发表于 2013-1-3 14:07:22 | 显示全部楼层
去后台更新一下网站,如果还是有问题,请检查是不是由于自己添加了伪静态造成的
 楼主| 发表于 2013-1-3 14:13:43 | 显示全部楼层
我没有添加伪静态,只是重启了一下服务器,网站就打不开了啊!现在就是Nginx启动不了啊!更新网站出现这个提示:
“Nginx未启动,如果不是判断错误,新建的网站可能无法访问,请尝试重启Nginx!”
怎么办?
我重装一下Nginx可以吗?重装了,其它的还有什么要设置的吗?还有没有什么解决方法?
 楼主| 发表于 2013-1-3 14:17:21 | 显示全部楼层
我重启服务器,又出现了这个错误

[root@AY1212260349569db9188 ~]# nginx-restart
Shutting down php_fpm
Starting php_fpm  done
nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 128
nginx: [emerg] could not build the server_names_hash, you should increase either serverå¯å¤±è´¥ï¼h_max_size: 512 or server_names_hash_bucket_size: 128
Nginx was restarted failed.


这可怎么办?
 楼主| 发表于 2013-1-3 16:06:44 | 显示全部楼层
问题解决了,我来回一下,感谢“爱洞特漏 ”的帮忙。
也让大家遇到这个问题好解决。
把/usr/local/nginx/conf/nginx.conf 文件里这一行改成
原来的是:
server_names_hash_bucket_size 128;
改成:
server_names_hash_bucket_size 512;
发表于 2013-4-17 20:34:10 | 显示全部楼层
我今天重启后网站也无法访问,修复啊,什么的都不行,刚才把这个改成512,貌似可以了。
发表于 2013-7-9 08:18:22 | 显示全部楼层
我也可以了
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Archiver|URLOS ( 粤ICP备18087780号 )

GMT+8, 2025-5-8 06:55 , Processed in 0.026728 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表