{"id":13926,"date":"2024-05-29T13:46:25","date_gmt":"2024-05-29T10:46:25","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=13926"},"modified":"2024-05-29T13:46:26","modified_gmt":"2024-05-29T10:46:26","slug":"how-to-install-ssl-certificates-on-nginx-web-server-on-ubuntu-24-04-noble-numbat","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/how-to-install-ssl-certificates-on-nginx-web-server-on-ubuntu-24-04-noble-numbat\/","title":{"rendered":"How To Install SSL Certificates On Nginx Web Server On Ubuntu 24.04 Noble Numbat"},"content":{"rendered":"\n
Securing your website with SSL (Secure Sockets Layer) certificates is essential for protecting sensitive data and establishing trust with your users. SSL certificates encrypt the data transmitted between your server and clients, ensuring privacy and data integrity. This guide will walk you through the steps to install SSL<\/a> certificates on an Nginx web<\/a> server running on Ubuntu 24.04 Noble Numbat.<\/p>\n\n\n\n Before starting, ensure your package list is up to date. Open your terminal and run:<\/p>\n\n\n\n This command refreshes the package list and ensures you have the latest information on available packages.<\/p>\n\n\n\n Certbot is a tool that automates the process of obtaining and installing SSL certificates from Let’s Encrypt. Install Nginx<\/a> and Certbot by running:<\/p>\n\n\n\n Make sure your domain is correctly configured and pointing to your server’s IP address. You can use DNS tools like This command should return your server’s IP address.<\/p>\n\n\n\n If you have a firewall enabled, ensure that it allows HTTPS traffic. Run the following commands to allow traffic on both HTTP (port 80) and HTTPS (port 443):<\/p>\n\n\n\n The first command allows both HTTP and HTTPS traffic, and the second command removes the previous rule that allowed only HTTP traffic.<\/p>\n\n\n\n Use Certbot to obtain an SSL certificate for your domain. Certbot will automatically configure Nginx to use the certificate. Run:<\/p>\n\n\n\n Replace During this process, you’ll be prompted to enter your email address for urgent renewal and security notices, and agree to the Let’s Encrypt terms of service.<\/p>\n\n\n\n After Certbot completes the installation, it will reload Nginx to apply the new configuration. To verify the installation, open your browser and navigate to:<\/p>\n\n\n\nStep 1: Update Your Package List<\/h2>\n\n\n\n
$ sudo apt update<\/code><\/pre>\n\n\n\n
Step 2: Install Nginx and Certbot<\/h2>\n\n\n\n
$ sudo apt install nginx certbot python3-certbot-nginx<\/code><\/pre>\n\n\n\n
Step 3: Configure Your Domain<\/h2>\n\n\n\n
dig<\/code> or online services to verify this. For example:<\/p>\n\n\n\n
$ dig yourdomain.com +short<\/code><\/pre>\n\n\n\n
Step 4: Allow HTTPS Traffic<\/h2>\n\n\n\n
$ sudo ufw allow 'Nginx Full'\n$ sudo ufw delete allow 'Nginx HTTP'<\/code><\/pre>\n\n\n\n
Step 5: Obtain an SSL Certificate<\/h2>\n\n\n\n
$ sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com<\/code><\/pre>\n\n\n\n
yourdomain.com<\/code> and
www.yourdomain.com<\/code> with your actual domain names. Certbot will guide you through the process, including verifying your domain ownership and configuring Nginx.<\/p>\n\n\n\n
Step 6: Verify SSL Certificate Installation<\/h2>\n\n\n\n
https:\/\/yourdomain.com<\/code><\/pre>\n\n\n\n