After you sudo apt-get install nginx-full and you get this:
nginx: Setting up nginx-full (1.9.2-1) ...
nginx: Starting nginx: nginx failed!
nginx: invoke-rc.d: initscript nginx, action "start" failed.
nginx: dpkg: error processing nginx-full (--configure):
nginx: subprocess installed post-installation script returned error exit status 1
nginx: dpkg: dependency problems prevent configuration of nginx:
nginx: nginx depends on nginx-full (>= 1.9.2-1) | nginx-light (>= 1.9.2-1) | nginx-extras (>=
1.9.2-1); however:
nginx: Package nginx-full is not configured yet.
nginx: Package nginx-light is not installed.
nginx: Package nginx-extras is not installed.
nginx: nginx depends on nginx-full (<< 1.9.2-1.1~) | nginx-light (<< 1.9.2-1.1~) | nginx-extras
(<< 1.9.2-1.1~); however:
nginx: Package nginx-full is not configured yet.
nginx: Package nginx-light is not installed.
nginx: Package nginx-extras is not installed.
nginx:
nginx: dpkg: error processing nginx (--configure):
nginx: dependency problems - leaving unconfigured
nginx: Errors were encountered while processing:
nginx: nginx-full
nginx: nginx
nginx: E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed nginx install.
Skipped nginx config, due to presence in failed steps
1 steps selected, 1 failed.
Failed steps: nginx
All you need to do is remove:
listen [::]:80 default_server;
from /etc/nginx/sites-enabled/default.
This is caused if you server does not support IPv6 but nignx is trying to listen on it.