Web / NGINX Interview questions
How do you install NGINX on Ubuntu?
sudo apt update sudo apt install nginx sudo systemctl enable nginx sudo systemctl start nginx
This installs NGINX from Ubuntu's default repositories, sets it to start on boot, and starts the service immediately. You can confirm it's running with systemctl status nginx or by visiting the server's IP in a browser to see the default welcome page.
For a newer release than Ubuntu ships, you'd instead add the official NGINX apt repository and its signing key before installing, which gives access to mainline or stable upstream builds rather than the distro-frozen version.
More Related questions...