• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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