Hello,
I have a problem with SSL, i generate SSL's with Lets Encrypt, manually and i put the vHost in /usr/local/apache/conf.d/vhosts-ssl.conf , it's look like this:
# vhost_start mysubdomain1.domain.tld
<VirtualHost MYIP:443>
ServerName mysubdomain1.domain.tld
ServerAdmin admin@server.tld
DocumentRoot /home/user/public_html/staging/mysubdomain1/public
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mysubdomain1.domain.tld/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysubdomain1.domain.tld/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/mysubdomain1.domain.tld/fullchain.pem
<IfModule mod_suexec.c>
SuexecUserGroup user user
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup user user
suPHP_ConfigPath /home/user
</IfModule>
<Directory "/home/user/public_html/staging/mysubdomain1/public">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end mysubdomain1.domain.tld
And the Vhost it's works, but when i put another vhost with mysubdomain2 and trying acces the
https://mysubdomain2.domain.tld it will redirect to the mysubdomain1.domain.tld, i don't understand why it works only one SSL.
VHost mysubdomain2:
# vhost_start mysubdomain2.domain.tld
<VirtualHost MYIP:443>
ServerName mysubdomain2.domain.tld
ServerAdmin admin@server.tld
DocumentRoot /home/user/public_html/staging/mysubdomain2/public
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mysubdomain2.domain.tld/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysubdomain2.domain.tld/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/mysubdomain2.domain.tld/fullchain.pem
<IfModule mod_suexec.c>
SuexecUserGroup user user
</IfModule>
<IfModule mod_suphp.c>
suPHP_UserGroup user user
suPHP_ConfigPath /home/user
</IfModule>
<Directory "/home/user/public_html/staging/mysubdomain2/public">
AllowOverride All
</Directory>
</VirtualHost>
# vhost_end mysubdomain2.domain.tld