For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing PGP key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the apt program keyring.
sudo apt-key add nginx_signing.key
Now Open /etc/apt/sources.list and add these lines.
then run the following commands:
sudo apt-get update
sudo apt-get install nginx
You can check nginx version
You can check nginx status
sudo service nginx status