Install Latest Nginx on Ubuntu
Install the latest version of Nginx on Ubuntu
Before Starting
Links
Supported Installation
This installation procedure is tested on Ubuntu 22.04.x LTS with x86_64 architecture, but should be compatible with other version of Ubuntu.
Installation
Install dependencies
sudo apt install curl gpgAdd gpg key
curl https://nginx.org/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/nginx_signing.gpgSetup apt source list
printf "deb [signed-by=/etc/apt/trusted.gpg.d/nginx_signing.gpg] https://nginx.org/packages/ubuntu $(lsb_release -cs) nginx\ndeb-src [signed-by=/etc/apt/trusted.gpg.d/nginx_signing.gpg] https://nginx.org/packages/ubuntu $(lsb_release -cs) nginx\n" | sudo tee /etc/apt/sources.list.d/nginx.listInstall Nginx
sudo apt update && sudo apt install nginxFinishing
Start Nginx
sudo systemctl start nginx