The error nginx: [emerg] duplicate listen options for [::]:443 usually happens when you have more than one domain or subdomain on a shared server.
The error nginx: [emerg] duplicate listen options for [::]:443
Imagine the following scenario:
– yoursite.com
– api.yoursite.com
In this case, you will have an nginx configuration for each domain above, that is:
– /etc/nginx/sites-available/yoursite.com
– /etc/nginx/sites-available/api.seusite.com
In both files, on the line where the configuration is listen [::]:443. Remove the flag: ipv6only=onThe ipv6only=on flag can only be used once, if it is in more than one file, nginx will return nginx: [emerg] duplicate listen options for [::]:443
listen [::]:443
Remove the flag: ipv6only=on
The ipv6only=on flag can only be used once, if it is in more than one file, nginx will return nginx: [emerg] duplicate listen options for [::]:443
Solution The error nginx: [emerg] duplicate listen options for [::]:443 Remove the flag: ipv6only=on
For the solution of the error nginx: [emerg] duplicate listen options for [::]:443 Remove the flag: ipv6only=on