SSL on DrupalVM with Nginx, creating self-signed certificate

To setup SSL on DrupalVM with self-signed certificate you need a few commands and to change config, choose a place where you will store your certificates and then run first

sudo openssl genrsa -out "devcert.key" 2048

then do the

sudo openssl req -new -key "devcert.key" -out "devcert.csr"

and finally 

sudo openssl x509 -req -days 365 -in "devcert.csr" -signkey "devcert.key" -out "devcert.crt"

then in your config.yml add those certificates like below

  - server_name: "{{ first_site }} www.{{ first_site }}"
    root: "{{ first_site_path }}"
    is_php: true
    extra_parameters: |
          listen 443 ssl;
          ssl_certificate     /var/www/drupalvm/code/devcert.crt;
          ssl_certificate_key /var/www/drupalvm/code/devcert.key;
          ssl_protocols       TLSv1.1 TLSv1.2;
          ssl_ciphers         HIGH:!aNULL:!MD5;

and provision your vagrant to have this changes running.