To secure Nginx with Let's Encrypt on OpenSUSE 15.1/15.2, follow these steps:
sudo zypper install certbot python3-certbot-nginx
sudo certbot --nginx
This will start the interactive certbot wizard, which will guide you through the process of obtaining a certificate. Follow the prompts to enter your domain name, email address, and agree to the terms of service.
Once the process is complete, certbot will automatically update your Nginx configuration to use the new SSL certificate.
Test your configuration by accessing your website over HTTPS. You should see the green padlock icon in your browser's address bar, indicating that the connection is secure.
That's it! Your Nginx server is now secured with a Let's Encrypt SSL certificate.
Note: If you need to manually specify the location of the Nginx configuration file, you can use the
--nginx-server-root
option. For example:
sudo certbot --nginx --nginx-server-root /etc/nginx