Nginx certbot error

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

gogopip.com
````````````
I ran this command:
`````````````
certbot
`````````````
It produced this output:

`````````````
nginx restart failed:
nginx: [emerg] "server_names_hash_bucket_size" directive is duplicate in /etc/nginx/defaults.conf:18

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

ionos

I can login to a root shell on my machine (yes or no, or I don't know):

i am user root (0)
``````````
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of `certbot --version` or `certbot-auto --version` if you're using Certbot):
1 Like
default_type application/octet-stream;
tcp_nopush on;
tcp_nodelay on;
sendfile on;

log_format bytes '$bytes_sent $request_length';

keepalive_timeout  2;
types_hash_max_size 2048;

disable_symlinks if_not_owner from=$document_root;

server_tokens off;

client_max_body_size 1024m;
client_body_buffer_size 128k;

server_names_hash_bucket_size 128;
server_names_hash_max_size 10240;

fastcgi_buffer_size 128k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
fastcgi_read_timeout 600s;
fastcgi_intercept_errors on;

gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript text/x-js;
gzip_buffers 16 8k;

map $http_x_forwarded_proto $proxy_https { default ""; https on; }

ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES1$
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_dhparam /etc/nginx/certs/dhparams.pem;



``````````````
1 Like

This is a bug in Certbot.

There is a workaround listed in that link, which is to just set server_names_hash_bucket_size to 128, and keep it in the main nginx.conf rather than in defaults.conf.

2 Likes

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