Adding dedicated cert for a domain – Nginx and Letsencrypt (certbot)

Real quick and simple certbot commands to create a certificate only for a new domain/subdomain.
Then install and update your preconfigured nginx config for said domain with the newly created certs.

Prerequisites

  • Nginx configured for your target domain eg:
# /etc/nginx/sites-enabled/example.com
server {
    root /var/www/example.com/public;
    index index.php index.html index.htm;

    server_name example.com www.example.com;

    location ~ /.well-known {
        allow all;
    }
    location ~ /\.ht {
        deny all;
    }

    listen 443 ssl;
    listen 80;
}

Creating and Installing New Certificates

# For additional domains to be covered by the same cert you can append with -d <another.com>
$ sudo certbot certonly --cert-name sub01.example.com -d sub01.example.com

# List existing certs
$ sudo certbot certificates

# Configure certs for nginx
$ sudo certbot --nginx

Azure Storage (Spring Starter) – Error Status Code 400: AccountRequiresHttps

The following error occurred in a recent project that required integration with Azure Blob Storage and an existing Spring Boot application:

Error Status Code 400: AccountRequiresHttps

Resolution:

Apply azure.storage.enable-https=true to your application.properties file

Resources:

https://github.com/microsoft/azure-spring-boot/pull/495/commits/ff5e26b691144677da94f2a6d59de79ce08fda16