certbot-auto certificates
Remember to include the already existing domain certificate (staging.example.com).
certbot-auto certonly --expand -d staging.example.com,subdomain1.staging.example.com,subdomain100.staging.example.com,subdomain200.staging.example.com
This will result in a certificate valid for all above domains.
Only additions are shown below.
Non ssl conf:
... ServerAlias *.staging.example.com ... RewriteEngine on RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
SSL conf:
... ServerAlias *.staging.example.com ... Include /etc/letsencrypt/options-ssl-apache.conf SSLCertificateFile /etc/letsencrypt/live/staging.example.com-0001/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/staging.example.com-0001/privkey.pem