I added theses lines to the "/etc/apt/sources.list":
deb http://nginx.org/packages/mainline/debian/ jessie nginx
deb-src http://nginx.org/packages/mainline/debian/ jessie nginx
After that I've tried to update nginx with:
sudo apt-get clean && sudo apt-get install nginx
But I get the following error:
Unpacking nginx (1.9.15-1~jessie) over (1.6.2-5+deb8u1) ...
dpkg: error processing archive /var/cache/apt/archives/nginx_1.9.15-1~jessie_amd64.deb (--unpack):
trying to overwrite '/usr/share/nginx/html/index.html', which is also in package nginx-common 1.6.2-5+deb8u1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nginx_1.9.15-1~jessie_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
What am I doing wrong? Thank you.