• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Forward Domain - Problem with SSL

Wolfgang Giesel

New Pleskian
Hello,

I have this situation with Plesk 17.5.3:
I forward the domain shop.foam-tv.com to a other domain that I manage with plesk (foam.surf)
When I access http://shop.foam-tv.com I will forwarded to https://foam.surf as expected.
When I access to https://shop.foam-tv.com it opens the typical PHP Test site.

How can I forward both cases to the new website.

Thank you.

Best regards.
Wolfgang
 
There are two issues involved.

One is that you are missing the SSL certificate for the forwarded domain. This typically occurs with Let's Encrypt, because the token file cannot be written or read on a redirected domain. For a workaround, configure the domain as web space and place this .htaccess file into the document root directory of the domain:
Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/.well-known/acme-challenge [NC]
RewriteRule .* - [L]
RewriteRule ^(.*)$ https://foam.surf/$1 [L,R=301]
Then create the Let's Encrypt SSL certificate for the domain.

The second issue is that the redirect itself is not configured correctly. To solve that, I'd need to have a look at your panel, which obviously is not possible, nor can I provide this kind of individual support.

My suggest to solve both issues at the same time is to
1) Remove the shop.foam-tv.com domain.
2) Add the same domain as an alias with the "Add Alias" button to the main domain. When you add the alias, UNCHECK the 301 redirect checkbox. You do not want the 301 redirect, but a real alias. If the domain is configured as an alias, it will do two things: It will deliver the website content on the domain name AND when you use the Let's Encrypt function on the redirect target (the main domain), you can add the alias to the certificate so that it is covered by the same certificate.
 
Dear Peter,

Thank you very much for your help. I finally used the alias solution to create the alias and it works for me.

Thank you very much.

Best regards,
Wolfgang
 
Back
Top