.

EDIT/INCREASE server_names_hash_bucket_size

English   English (change)

EDIT/INCREASE server_names_hash_bucket_size

server-names-hash-bucket image

If you’re using nginx, and your domain name exceeds 32 characters, you may receive an error message when you restart the web server.

Quite likely, you need to tell nginx to allow for longer domain names.

To do so, open your config file. For you installed Nginx using a package manager, you can access this with:-

[sniplet guvSellBox]
[sniplet vpsIndexSell]
[text]sudo nano /etc/nginx/nginx.conf[/text]

For others, who compiled from source:-

[text]sudo nano /usr/local/nginx/conf/nginx.conf[/text]

.. and in there, within the http section, that looks like this ..

[text]
http {
#various settings here
}
[/text]

Just add this line:-
[text]server_names_hash_bucket_size 64;[/text]

Save the file.

Reboot nginx:-

[text]sudo /etc/init.d/nginx restart[/text]

And your longer domain name should work. If the name is longer than 64 characters, swap the ’64′ value for 128, but I pity your users :)

.