Website imported from Plesk with wrong redirects

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.1
Webmin version 2.202
Virtualmin version 7.20.2
Webserver version Apache 7.20.2

Hi,

I imported some websites from Plesk, and I see some problems in some of them:

Working one: it creates LE certs, has some default redirects
Wrong one: does not create LE certs, has wrong (?) redirects

Working one:


Wrong one:


The LE certs fail giving to LE an http file as a response instead of the normal response, so probably the wrong redirects are the problem, but I do not know how to solve it.

@urbaman,

Have you setup each of the domains listed?

Hi @tpnsolutions

For the working website(s), I only setup the main domain.com (migrated from plesk) without any other subdomain or redirect. They all came up (all of the migrated sigle-domain website work the same way with the same redirect settings and the same subdomains to request LE certs for.

The NOT working one(s) are migrated from Plesk with subdomains and sub-websites. They came up with less and different redirects, less subdomains to request LE for and seems like they fail LE requests responding with an html document instead of the proper LE file, as if they are redirected the wrong way.

I see the working websites have something like this in the redirects
image

While the not working ones have
image

and I can’t seem to understand why, and also I can’t seem to be able to change them.

Still don’t know if this is the problem, but seeing that regexp in the working websites points me to this.

@urbaman,

Let’s Encrypt is failing because it’s trying to setup a cert that includes:

If you have not setup all those sub-domains (www, mail, webmail) pointing to your server, LE will fail. If you don’t intend or want to at this point, just choose “Domain names listed here” and enter the versions of your domain that “are” pointing at the server (ex. domain.com and www.domain.com).

Then generate the cert again.

Keep in mind, LE does have a daily quota, so if you fail too often you may exceed the quota and have to wait to try again.

Hi @tpnsolutions

I do have those DNS pointing to the server. I have pretty much the same settings for the working domains (with way more subdomains to cover by LE) and the ones not working.

I also leave " Check if domain names can be resolved?" to yes and they are.

I only see those default unchangable redirects are different between the working and not working websites.

Hi,

Actually found the solution: I had to disable and re-enable both

  • Email Client autoconfiguration in Email Settings - Mail Client Configuration
  • Redirect webmail, admin in System Settings - Server Template - Website for domain

This recreated the right Website directives for the two not-working websites (together with working admin, webmail, autoconfig, autodiscover aliases)

Then, I also had to be carefull with my internal reverse proxy, it has obviously to manage all of the above subdomains for all of the domains.

Thank you very much.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.