Accidentally overwrote /etc/nginx/sites-enabled now certbot causing nginx issues

I accidentally used ‘sudo mv’ instead of ‘sudo mv’ which overwrote my sites-enabled config file.

I then ran ‘sudo cp’ and changed all the references from to however now I’m getting the error:

nginx: [emerg] duplicate listen options for [::]:443 in /etc/nginx/sites-enabled/

How do I fix this?

Hi @JakeIQ

you can't have duplicated listen directives.

So remove one of these (perhaps the second).

Remove the duplicate option from all but one of the listen directives.

If the duplicate option is ipv6only=on, it's been on by default for years, so you can probably just remove it entirely.

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