# /etc/init.d/nginx reload
* Reloading nginx configuration nginx [fail] # nginx -t
nginx: [emerg] could not build the server_names_hash, you should increase either server_names_hash_max_size: or server_names_hash_bucket_size:
nginx: configuration file /etc/nginx/nginx.conf test failed # tail /var/log/nginx/error.log
// :: [emerg] #: could not build the server_names_hash, you should increase either server_names_hash_max_size: or server_names_hash_bucket_size:

解决办法是在 nginx 配置文件的 http 段中增加如下配置:

# vi /etc/nginx/nginx.conf
...
http {
...
server_names_hash_max_size ;
server_names_hash_bucket_size ;
...
}
...

原文:http://www.vpsee.com/2015/02/nginx-could-not-build-the-server_names_hash/

Nginx: could not build the server_names_hash 解决办法的更多相关文章

  1. nginx could not build the server_names_hash 解决方法

    nginx “nginx could not build the server_names_hash”解决方法 给一个服务器下增加了一些站点别名,差不多有20多个. 重启nginx时候,提示: cou ...

  2. android studio 一直卡在Gradle:Build Running的解决办法

    转:android studio 一直卡在Gradle:Build Running的解决办法   在使用AS开发安卓应用程序的时候经常会遇到Gradle build running一直在运行甚至卡死的 ...

  3. nginx的权限问题(Permission denied)解决办法

    nginx的权限问题(Permission denied)解决办法 一个nginx带多个tomcat集群环境,老是报如下错误:failed (13: Permission denied) while ...

  4. Nginx 502错误触发条件与解决办法汇总(转载)

    一些运行在Nginx上的网站有时候会出现“502 Bad Gateway”错误,有些时候甚至频繁的出现.有些站长是在刚刚转移到Nginx之后就出现了这个问题,所以经常会怀疑这是不是Nginx的问题,但 ...

  5. 转:android studio 一直卡在Gradle:Build Running的解决办法

    在使用AS开发安卓应用程序的时候经常会遇到Gradle build running一直在运行甚至卡死的情况,解决方法如下: 方法1: 1.在C:\User\<用户名>\.gradle 目录 ...

  6. nginx重启无法找到PId的解决办法

    nginx停止的时候,出现了如下错误 nginx: [error] open() "/export/servers/nginx/logs/nginx.pid" failed (2: ...

  7. 源码包安装 NGINX时候遇到的错误以及解决办法!

    最近跟一个公司合作,要把我们的应用安装在他们的服务器上,不过问题来了.他们为了他们自己服务器安全,不给我们root权限,只给了我们普通用户权限,所有的程序都要装在规定的路径里,限制可不少.没办法装吧~ ...

  8. nginx+php产生大量TIME_WAIT连接解决办法

    问题:当启动nginx和php-fpm时,使用netstat -tunap查看到大量TIME_WAIT连接 由于不知道原因,害怕是受到攻击,马上killall nginx 和php-fpm 会不会是8 ...

  9. [转]Nginx+ThinkPHP不支持PathInfo的解决办法

    FROM : http://www.4wei.cn/archives/1001174 应集团要求,公司的服务器全收到集团机房统一管理了,失去了服务器的管理配置权限. 杯具就此开始. 首先要解决文件大小 ...

随机推荐

  1. Android中使用自定义View实现下载进度的显示

    一般有下载功能的应用都会有这样一个场景,需要一个图标来标识不同的状态.之前在公司的项目中写过一个,今天抽空来整理一下. 一般下载都会有这么几种状态:未开始.等待.正在下载.下载结束,当然有时候会有下载 ...

  2. Cocos2d中使用颜色混合:加算,减算

    转自http://blog.sina.com.cn/s/blog_7a2ffd5c0100xtid.html CCSprite有一个ccBlendFunc类型的blendFunc_结构体成员,可以用来 ...

  3. 一个批量移除BOM头的bash脚本

    有时候我们的文件可能不需要BOM头,例如:我们公司的SVN服务器提供的代码都UTF8编码保存(不能有BOM头)否则代码提交不上去. 文件很多的时候就需要批量操作. 脚本使用方法:remove-bom. ...

  4. webstorm 配合IIS使用

    添加名称之后 点击apply 再点击ok 然后在打开设置 就可以配置下图的信息 我们需要在webstorm里面打开IIS部署的地址怎么设置呢? 技术交流QQ群:15129679

  5. BZOJ 4337: BJOI2015 树的同构 树hash

    4337: BJOI2015 树的同构 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4337 Description 树是一种很常见的数 ...

  6. ArcGIS Server API for JavaScript调用错误:已阻止跨源请求:同源策略禁止读取位于......

    已阻止跨源请求:同源策略禁止读取位于 http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapSe ...

  7. Visual Studio 2010配置Opencv2.4.9

    转自: http://blog.csdn.net/huang9012/article/details/21811129 这篇文章作为OpenCV的启程篇,自然少不了先系统地介绍OpenCV开发环境的配 ...

  8. Google 面试题:Java实现用最大堆和最小堆查找中位数 Find median with min heap and max heap in Java

    Google面试题 股市上一个股票的价格从开市开始是不停的变化的,需要开发一个系统,给定一个股票,它能实时显示从开市到当前时间的这个股票的价格的中位数(中值). SOLUTION 1: 1.维持两个h ...

  9. 安装mmseg出错 config.status: error: cannot find input file: src/Makefile.in

    aclocallibtoolize --forceautomake --add-missingautoconfautoheadermake clean

  10. windows原生开发之界面疑云

        windows桌面开发,界面始终是最大的困惑.我们对前端工具的要求,其实只有窗体设计器.消息映射,过分点的话自适应屏幕.模型绑定.能够免于手工书写,其实这个问题并不复杂,但VS不实现.QT语法 ...