brew install mkcert
#Now create your cert, run it as a regular user
mkdir certs
cd certs
mkcert -CAROOT
mkcert -install
# Make the cert files
mkcert drupal89.local
The above commands will create two files
/home/username/certs/drupal89.local.pem
/home/username/certs/drupal89.local-key.pem
Install the SSL module
yum install mod_ssl
Configure your virtual host with the cert
emacs /etc/httpd/conf.d/drupal89.conf
Add the new certs
<VirtualHost drupal89.local:80>
Redirect "/" "https://drupal83.local/"
</VirtualHost>
<VirtualHost drupal89.local:443>
ServerName drupal89.local:443
ServerAlias www.drupal89.local:443
DocumentRoot /var/www/html/drupal89
ErrorLog /var/log/httpd/drupal89_error_log
CustomLog /var/log/httpd/drupal89_access_log combined
SSLCertificateFile /home/username/certs/drupal89.local.pem
SSLCertificateKeyFile /home/username/certs/drupal89.local-key.pem
<Directory /var/www/html/drupal89>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</Directory>
</VirtualHost>
Restart apache
systemctl restart httpd