Basically, nginx -t test the nginx.conf file … and it is failing because main format is not defined. Nginx will not start in this case.
Main format can be defined this way
If you change manually the nginx.conf deleting “main” modificator, nginx will run anyway but … after bench setup production or bench setup nginx will broke the file again …
I’ve been informed that nginx can be installed from bench → bench install nginx
This will set the log format properly. I’ve never try this way, always install nginx from apt.