Monday, August 29, 2016

Service nginx reload Return Fail


When I check "tail /var/log/nginx/error.log", i see notify that "could not build the server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64" If you met reference, then add 2 the line:
server_names_hash_bucket_size 64;
server_names_hash_max_size 4112;


user www-data;
worker_processes 4;
pid /run/nginx.pid;

events {
 worker_connections 768;
}

http {


 sendfile on;
 tcp_nopush on;
 tcp_nodelay on;
 keepalive_timeout 65;
 types_hash_max_size 2048;
        #Enable server_names_hash_bucket_size 64;
 server_names_hash_bucket_size 64;
        #Add server_names_hash_max_size 4112;
 server_names_hash_max_size 4112;
 include /etc/nginx/mime.types;
 default_type application/octet-stream;


 access_log /var/log/nginx/access.log;
 error_log /var/log/nginx/error.log;


 gzip on;
 gzip_disable "msie6";




 


 include /etc/nginx/conf.d/*.conf;
 include /etc/nginx/sites-enabled/*;
}


EmoticonEmoticon