Only 1 site it works with SSL rest of them redirect

Started by Laur, July 21, 2016, 06:31:26 AM

Previous topic - Next topic

Laur

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



Administrator

this bug was fixed with the latest version, you should check that you have the latest version

Neo2SHYAlien

"Would you tell me, please, which way I ought to go from here?"
"That depends a good deal on where you want to get to," said the Cat.
"I don't much care where–" said Alice.
"Then it doesn't matter which way you go," said the Cat.
Neo2SHYAlien's Blog