Setting up domain name not working

I have a working production server for my custom app. Im running Ubuntu 20 as my OS.

I want to now get a domain name to point to the server. I have a domain name which i have pointed to the servers IP

I then ran the following commands on the server:
cd frappe-bench
bench config dns_multitenant on
bench setup add-domain --site site1.local []
bench setup nginx (answer Y to the question about replacing the config file)
sudo service nginx restart

However at the last command I get an error -
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xe” for details.

When i run the systemctl command above I get : -
nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset:>
Active: failed (Result: exit-code) since Fri 2021-10-15 11:54:28 CEST; 12s>
Docs: man:nginx(8)
Process: 44287 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_proc>

Inside /var/log/nginx/nginx.conf I see the error msg : -
2021/10/15 12:03:51 [emerg] 44489#44489: could not build map_hash, you should increase map_hash_bucket_size: 32

Can someone help me figure what is happening. These same commands have worked many times for me earlier.

Please check this discussion: