
FROM: https://benohead.com/generating-new-certificate-xampp-windows/

1. Modify openssl.cfg file at v3_ca section: 

[ alternate_names ]
DNS.1        = *.local.io

[ v3_ca ]
subjectAltName      = @alternate_names


2. Generate key & crt files:

$ openssl req -nodes -new -sha256 -days 730 -x509 -keyout whitedigital.local.key -out whitedigital.local.crt

Use following settings: 

> Country Name: LV
> State: 
> City: Riga
> Organization Name: White Digital SIA
> Organizational Unit:
> Common Name: *.local.io
> Email:
> Company Name:



# =3= Configure nginx
server {
    listen 80:
    listen 443 ssl;

    root /var/www;

    server_name smth.local.io;

    ssl_certificate      /etc/ssl/certs/whitedigital.local.crt;
    ssl_certificate_key  /etc/ssl/certs/whitedigital.local.key;

    location / {
        try_files $uri $uri/ =404;
    }
}


# =4= Install certificate to Trusted Root Certificates on your client (Local machine)

# =5= Add to yor local hosts file: 
127.0.0.1 whitedigital.local.io somethingelse.local.io

