How to install Nginx with an exact version on Amazon Linux 2?
What I tried
Both get nginx 1.20.0 or no package available. How can I get other versions, ex: nginx 1.14.2?
You can install any nginx versions.
Check this: https://centos.pkgs.org/7/nginx-x86_64/nginx-1.14.2-1.el7_4.ngx.x86_64.rpm.html
If you wanna install nginx 1.14.2 follow this:
wget https://nginx.org/packages/centos/7/x86_64/RPMS/nginx-1.14.2-1.el7_4.ngx.x86_64.rpm
sudo rpm -Uvh nginx-1.14.2-1.el7_4.ngx.x86_64.rpm
nginx -v