We see exactly the same behavior. Sometimes our Subdomains work and on some requests they result in a 307 redirect to another domain. Interesting thing is it's not the Plesk Server Domain itself, but the one it redirects to. But the redirect seems to be resolved internally.
Example:
- Plesk-Host-Domain is
plesk.example.net
, IP
11.22.33.44
-
plesk.example.net
(without 8443) redirects to
www.example.com
(note it's a completely other Domain with another TLD, but also hosted on Plesk)
- We have a subscription with Domain
test.some-other-domain.com
(it's created as Domain, not as a Subdomain)
Now when browsing to our domain
curl -s -I https://test.some-other-domain.com
sometimes we get the intended page for
test.some-other-domain.com
HTTP:
HTTP/2 200
server: nginx
date: Thu, 20 Jul 2023 14:30:11 GMT
content-type: text/html
content-length: 464
x-accel-version: 0.01
last-modified: Thu, 20 Jul 2023 12:14:16 GMT
etag: "1d0-600ea16441d82"
accept-ranges: bytes
vary: Accept-Encoding
x-powered-by: PleskLin
and on every 2nd to 7th requests we get
HTTP:
HTTP/2 307
server: nginx
date: Thu, 20 Jul 2023 12:59:46 GMT
content-type: text/html; charset=iso-8859-1
location: https://www.example.com/
x-powered-by: PleskLin
Note that this is directly served by Plesks nginx and the location is NOT the Plesk-Host-Domain but the one it redirects to. So it doesn't seem to be a DNS round-robin as mentioned in the comment before.
BTW
curl -s -I http://11.22.33.44
results in exactly the same 307 redirect. Not to the Plesk-Host-Domain but to our
www.example.com
.
Is there any way to debug where exactly this redirect happens or even better from which config this is coming from?
I also did a
nginx -T
manually searching through any "rewrite" and "return" with no matching result.
I also looked for
default_server
and
server_name _
without a result.
Is there any other way how to debug this?