My current httpd.conf file looks something like this:
<VirtualHost *:443>
DocumentRoot /var/www/html/www.example1.com
ServerName www.example1.com
SSLEngine on
SSLCertificateFile /var/www/ssl/www.example1.com/certificate.crt
SSLCertificateKeyFile /var/www/ssl/www.example1.com/private.key
SSLCACertificateFile /var/www/ssl/www.example1.com/bundle.crt
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/html/www.example2.com
ServerName www.example2.com
SSLEngine on
SSLCertificateFile /var/www/ssl/www.example2.com/certificate.crt
SSLCertificateKeyFile /var/www/ssl/www.example2.com/private.key
SSLCACertificateFile /var/www/ssl/www.example2.com/bundle.crt
</VirtualHost>
I am hoping to be able to store the "ServerName" in some type of variable to be able to simplify the file (to something like this):
Define server_name = ServerName
<VirtualHost *:443>
DocumentRoot /var/www/html/${server_name}
ServerName ${server_name}
SSLEngine on
SSLCertificateFile /var/www/ssl/${server_name}/certificate.crt
SSLCertificateKeyFile /var/www/ssl/${server_name}/private.key
SSLCACertificateFile /var/www/ssl/${server_name}/bundle.crt
</VirtualHost>
Is there any way I can do something like this? I looked around and could not find any solutions that would help with this but I could be taking the wrong approach.