I'm using ubuntu 16 LAMP stack. I currently have virtual host files setup for each domain with cloudflare dns pointing to the same IP for 2 Wordpress sites.
I'm using cloudflare to generate a free TLS certificate signed by Cloudflare to install on the server for each domain.
Host files look like this
domain1.conf
<VirtualHost *:443>
ServerAdmin webmaster@domain1.com
ServerName domain1.net
ServerAlias www.domain1.net
DocumentRoot /var/www/html/domain1
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/domain1.crt
SSLCertificateKeyFile /etc/ssl/private/domain1.key
</VirtualHost>
domain2.conf
<VirtualHost ip:443>
ServerAdmin webmaster@domain1.com
ServerName domain2.net
ServerAlias www.domain2.net
DocumentRoot /var/www/html/domain2
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/domain2.crt
SSLCertificateKeyFile /etc/ssl/private/domain2.key
</VirtualHost>
My cert and key files are not .pem files does that matter?
Do I need to edit my ports.conf file? From reading another suggestion I added the first two lines.
NameVirtualHost *:80
NameVirtualHost *:443
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>