Control Web Panel

WebPanel => SSL => Topic started by: Laur on July 21, 2016, 06:31:26 AM

Title: Only 1 site it works with SSL rest of them redirect
Post by: Laur on July 21, 2016, 06:31:26 AM
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:

Code: [Select]
# 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:

Code: [Select]
# 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

Title: Re: Only 1 site it works with SSL rest of them redirect
Post by: Administrator on August 03, 2016, 04:39:58 PM
this bug was fixed with the latest version, you should check that you have the latest version
Title: Re: Only 1 site it works with SSL rest of them redirect
Post by: Neo2SHYAlien on August 03, 2016, 08:27:04 PM
Also you can check out this thread (http://forum.centos-webpanel.com/ssl/how-to-install-multiple-ssl-certificates-on-shared-ip/msg7929/#msg7929).