This is a step by step beginner’s guide shows how to install the latest version of Nginx web server (either mainline or stable) in Ubuntu 24.04 and Ubuntu 22.04 Desktop or Server.
Nginx is a popular free and open-source web server, that can be also used as reverse proxy, load balancer, mail proxy and HTTP cache.
For a just working version, user can run command sudo apt install nginx-full
to install it from Ubuntu system repository, which however is always old.
For the latest version, there are 2 ways to install the web server. Besides building from source, they include Ubuntu PPA and Nginx’s official repository.