I got the same problem.
When I set up ghost setup nginx ssl for my subdomain (www), I got
✖ Setting up SSL
One or more errors occurred.
1) CliError
Message: Failed to restart Nginx.
Debug Information:
OS: Ubuntu, v22.04.1 LTS
Node Version: v16.17.0
Ghost Version: 5.43.0
Ghost-CLI Version: 1.24.0
Environment: production
Command: 'ghost setup nginx ssl'
and then $ sudo nginx -t and I got the same error as you.
How do you change the nginx config to the ecc certificates ?
and is it solve the problem?
Thank you for your time!