Comment 21 for bug 1743592

Revision history for this message
Dan Streetman (ddstreet) wrote :

For those coming here because their installation or upgrade of the 'nginx' package fails due to their system using ipv6.disabled=1, you need to edit the file "/etc/nginx/sites-enabled/default" and remove or comment out this line:

        listen [::]:80 default_server;

Alternately, you can remove that file completely (it is actually a symlink to "/etc/nginx/sites-available/default"). However, you will of course need to create your own nginx configuration, for it to do anything useful.

Then you can restart the nginx service with:
$ sudo systemctl restart nginx
or just reboot.

You will also need to fix your broken installation of nginx:

$ sudo apt install --fix-broken

Note that apt may complain with a warning like:

W: APT had planned for dpkg to do more than it reported back (3 vs 7).
   Affected packages: nginx-core:amd64

I believe that warning can be ignored.