Error while running nginx -c /etc/nginx/nginx.conf -t


#1

I’m following these instructions to install Let’s Encrypt onto my Rock64 with 4gb ram.

When I try to perform this command

sudo certbot --authenticator webroot --installer nginx

I am receiving this error:

rock64@rock64:~$ sudo certbot --authenticator webroot --installer nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
nginx: configuration file /etc/nginx/nginx.conf test failed

The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(‘Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32\nnginx: configuration file /etc/nginx/nginx.conf test failed\n’,)

I am unsure of how to resolve this. What should I be doing?


#2

The value within the Nginx configure file was commented out.

server_names_hash_bucket_size 64;

Uncomment and change to 1024


#3

Hi,

The best (preferred) server_name_hash should be 64…

Thank you


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.