Nginx:could not build optimal server_names_hash

751 단어
[root@localhost sbin]# ./nginx -t
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size

해결 방법 은 nginx 프로필 의 http 세그먼트 에 다음 과 같은 설정 을 추가 하 는 것 입 니 다.
[root@localhost conf]# vi nginx.conf
...
http {
    ...
    server_names_hash_max_size 512;
    server_names_hash_bucket_size 128;
    ...
}
...
esc ,  :wq    #    

nginx - t 검사 프로필 다시 입력:
[root@localhost sbin]# ./nginx -t
nginx: the configuration file /usr/local/nginx//conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx//conf/nginx.conf test is successful

좋은 웹페이지 즐겨찾기