• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Let's Encrypt & Domain without hosting

WhiteTiger

Basic Pleskian
I need to create a certificate for a domain with the "Let's Encrypt" extension.

Domain is mapped to a multisite WP through an alias.
So in Plesk I have to configure:
  • maindomain.com (with WP multisite)
  • *.maindomain.com
  • second-domain.com (no hosting)
  • second-domain.maindomain.com alias of second-domain.com
This is working properly (with http).
Now I want the user to use https as well.
  • https// maindomain.com
  • https// second-domain.com
Now with the "Let's Encrypt" extension I can create a certificate for maindomain.com, but in the list I do not find the domain second-domain.com, perhaps because it is declared "no hosting".

But, if I create second-domain.com associated with a folder, I do not think that the alias still works because it would point to this folder instead of second-domain.maindomain.com. Or not?

Thanks in advance for any advice.
 
Hi WhiteTiger,

pls. note, that the Let's Encrypt certificate validation procedure is to place a ( temporary ) file in a folder called ".well-known", which is impossible, if you decided to setup "no hosting" for your alias. ;)

You are certainly able to use the option string "--webroot-path" with your desired path, but you have to do this over the command line ( logged in as user "root" ), without using the Plesk Control Panel.

Example:
Code:
plesk bin extension --exec letsencrypt cli.php --domain maindomain.com --domain second-domain.com --webroot-path /var/www/vhosts/maindomain.com/httpdocs --email [email protected]
Pls. inspect your "panel.log" for possible issues, when you use this command and pls. post the depending entries in case that you need help with possible investigations. ;)


Additional informations:


Sometimes, it is as well a good idea to change the log - level ( TEMPORARILY! ), to get more informations in Plesk - log - files:

 
Thanks for the answer, but I do not understand one thing.
Where is the "well-known" folder located? I do not see it anywhere.

Waiting for an answer I have made some tests.

I created the "second-domain" domain as a "hosting" with an own folder because I knew that in this Plesk would create files.
Then I changed the domain configuration by pointing to the "maindomain" folder.
Finally I created the certificate.
Everything is working, having now the two domains reachable by https:

But I did not know what you said to me now, about the folder and the temporary file.
My fear is that the two files will be created at the same point and if they have the same name they will overlap each other.
However, as I said, I do not see this folder.
 
Hi WhiteTiger,

to check my above informations, pls. inspect your "panel.log", where the Plesk Let's Encrypt Extension will log it's actions. You will then see as well, that the ( temporary ) folder will be created AND deleted as well after the whole validation process. ;)

If you desire to leave the folder, you have to setup in your "panel.ini" ( => /usr/local/psa/admin/conf ) for example:
Code:
...
[ext-letsencrypt]

disable-cleanup = true
...
More informations can be found at the Plesk documentation:

 
Back
Top