Install Nginx Server on Ubuntu 24.04 LTS, Step-by-Step Guide

This tutorial provides a straightforward guide to installing Nginx on Ubuntu 24.04 LTS. Nginx is a high-performance web server widely used for hosting websites, reverse proxying, and load balancing.

Follow these simple steps to set up Nginx quickly and efficiently on your Ubuntu server, ensuring a secure and reliable web environment.

Update Package List

First, update the package list to ensure you have the latest information:

sudo apt update

Install Nginx

Install Nginx using the following command:

sudo apt install nginx -y

Start Nginx

Start the Nginx service:

sudo systemctl start nginx

Enable Nginx to Start on Boot

Ensure Nginx starts automatically on boot:

sudo systemctl enable nginx

Adjust Firewall Settings

If you have a firewall enabled, allow traffic on HTTP (port 80) and HTTPS (port 443):

sudo ufw allow 'Nginx Full'

Verify Installation

Open your web browser and navigate to your server's IP address:

http://your_server_ip

You should see the Nginx default welcome page.

Nginx is now installed and running on Ubuntu 24.04 LTS.








Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+

Read more