It is very obvious the OP is not making any effort to research their project, other then asking here, there are plenty of good tutorials available that go into step by step details.
But before even thinking about installing nginx, myssql, php, etc. it would be much better
to learn a little just about Debian, package installation, configuration ,etc.
If the OP simply must have the shiniest newest version of nginx, they will need to download it, and install, it will not be available in the Debian repositories, I don't care how
many times they run 'apt-update' or upgrade etc,...
Before deciding to use the shiniest ,newest version, the OP should read:
https://wiki.debian.org/DontBreakDebian
Then :
from:
https://www.linode.com/docs/web-servers ... n-debian-8
Install nginx
From Debian Repositories
The simplest way to install nginx on a server is to download it from Debian’s repositories.
Install nginx and start the daemon:
Installing nginx from the Debian repositories ensures that nginx has been tested and will optimally run on Debian. However, Debian repositories are often a few versions behind the latest nginx release.
Nginx can be tested by navigating to your FQDN in your browser. The default nginx page should be present.
The same tutorial, above, also goes into how to install it , from the nginx site, and install the shiniest newest version, BUT I strongly do not recommend that.
If the OP does not like the particular tutorial I linked to, there are many others, as pointed out by Dasein,..
Just do a simple search, :
How to instal nginx on Debian 8
=================== slightly off topic =========
Expecting us to either write, or copy / paste, and quote entire tutorials, to the forum is
absurd, and there is no need to do that.
I am no expert at all, and to be honest, I am pretty ignorant about technical details, etc.
It has been pointed out on many occasions, I really don't know very much, about Linux or Debian, and this is true, However I did manage to install what I needed and setup my servers without ever needing to ask anyone here,...How ? by doing a few very simple searches, and reading , reading over again, carefully studying what I found in those searches, also comparing the different methods, and there are many,... I did my research,
and there is no reason some one should have to be asking these kind of questions, if they just do a little research.
It is possible one may encounter some details that require asking, and then one would need to post, including some details about the specific problem, perhaps a configuration file, or something.
I know, this another "to long to read", and not likely the OP will bother reading, nor reading any of the available documentation and tutorials, but then again someone else
trying to really do some research might stumble on to this thread when they do searches.
So any way, I will close this with a list of the tutorials I found most useful.
One last note though, on Debian 7 server, I used the Apache web server, instead of nginx, but that does not matter, the tutorials are available for both.
It is VERY important in either one, to look at the documentation that comes with the installation, in the docs, read the "README" files, there are some specific to Debian as well.
=========================== end of rant ========
List:
https://www.vultr.com/docs/setup-up-ngi ... n-debian-8
===========
https://www.atlantic.net/community/howt ... -debian-8/
===========
https://www.digitalocean.com/community/ ... n-debian-8
==============
Apology, since I used Apache, most of the tutorials I have are for apache, not nginx.
It is important to note, if one wants to use Nginx, it is best to remove all the Apache packages first, often Apache or Apache 2 is installed by default on Debian,
In any event, after installing nginx, the Apache server needs to be stopped first,
before starting the nginx server:
====
=====
Most of the tutorials recommend installing "sudo", I don't, I do not use it, and prefer
just using "su", if the OP does not understand, and know the difference, they need to research that first and decide.
Unlike other Linux distributions, Debian 8 does not come with sudo installed.
It is something from "Ubuntu", I think, but any way I do not use it , nor have installed
on any of my systems. It is easy enough to adjust, where the tutorials say "sudo"
, instead, one must run the command as root, "su" is the command to login as root,
after you are done "exit", takes you back to being a normal user.
Ok, well I have wasted enough time, and got bored with this...