• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

Resolved Subdomains get a 403 error

therider62

New Pleskian
I am running a multisite-wordpress installation with about 30 sites, half a dozen of which are mapped to 2nd-level-domains aliases, the rest are subdomains of the master domain.

I created a wildcard domain as an alias to the master domain, as well as the various 2nd-level-alias-domains.

All of them are secured by one Let's-Encrypt certificate. Everything ran smoothly for the past several months.

One of the 2nd-level-alias-domains was transferred away to another provider. Next time the certificate expired, it could not be renewed, because that particular 2nd-level-alias failed to comply with requirements. I deleted that alias, and this time the certificate renewal worked like a charm. Wonderful!

But now I noticed that the subdomain sites can't be opened anymore. The main site opens, the 2nd-level-domain sites open too, but the subdomain sites receive a 403 error.

1. I checked the .htaccess and could not find a problem there.
2. I checked "Protocol", and am not receiving an error there.
3. I activated DEBUG output in the WP toolkit, but did not get any output from there either.
4. The main domain has the correct certificate selected and activated. The certificate contains the wildcard domain as well, plus all the 2nd-level-domains.
5. I don't think this has anything to do with the WP Toolkit, but one can never be sure, of course.

Does anyone have an idea what could be the problem here and why this is popping up right now? Or where I should go looking for what kind of configuration error?

Of course, I am updating my wordpress installation all the time, as well as all the themes and plugins that go along with it. But I can not imagine that that could lead to a 403 error.
 
@therider62 , could you please monitor the following logs when you reproduce the error and confirm what's being logged:

/var/www/vhosts/maindomain.com/logs/error_log
/var/www/vhosts/subdomain.maindomain.com/logs/error_log
 
@therider62 , could you please monitor the following logs when you reproduce the error and confirm what's being logged:

/var/www/vhosts/maindomain.com/logs/error_log
/var/www/vhosts/subdomain.maindomain.com/logs/error_log
Thank you for your request. This is interesting.

* /var/www/vhosts/maindomain.com/logs/error_log does not produce any output, when I refresh the subdomain, that is producing the 403.
The only error I can see, but I am not 100% sure if it was triggered by my refresh, is this:

[Wed Nov 04 17:22:03.751229 2026] [core:error] [pid 3156918:tid 139805295875776] [client 193.32.127.215:0] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

* /var/www/vhosts/subdomain.maindomain.com/ does not exist. I am assuming this is because the subdomain is only a site within the multisite wordpress. I never added it explicitly as a subsite to PLESK. I *did* add a general purpose subsite "*", or the wildcard domain, meaning "*.maindomain.com".
 
Hey @therider62,

that "10 internal redirects" line (AH00124) is a loop inside Apache. A loop usually ends in a 500 though, not a 403, so I wouldn't be sure yet that this is your problem. First thing to find out is who actually throws the 403. Try this:
Code:
curl -skI https://sub.maindomain.com/

Look at the "Server" header and the body of the response (nginx, Apache and WordPress all have different-looking 403 pages). To rule out DNS, you can also pin the request to your server IP:
Code:
curl -skI --resolve sub.maindomain.com:443:YOUR_SERVER_IP https://sub.maindomain.com/

Since the subdomains are only a wildcard alias of the main domain, they don't get their own log folder - their requests end up in the main domain's logs. Watch these while you reload the subdomain (the system-level folder also includes the nginx proxy logs):
Code:
tail -f /var/www/vhosts/system/maindomain.com/logs/proxy_access_ssl_log /var/www/vhosts/system/maindomain.com/logs/access_ssl_log /var/www/vhosts/system/maindomain.com/logs/error_log /var/www/vhosts/system/maindomain.com/logs/proxy_error_log

If the request shows up in an access log with a 403, you know which layer answers. If it shows up nowhere, check the server-wide logs too:
Code:
tail -f /var/log/nginx/error.log /var/log/apache2/error.log

Next, since this started right after you deleted the alias and the cert got renewed: Plesk regenerated the vhost configs in that process. Check whether the wildcard alias is still in the generated configs. You should see *.maindomain.com in both:
Code:
grep -i "ServerAlias" /etc/apache2/plesk.conf.d/vhosts/maindomain.com.conf
Code:
grep -i "server_name" /var/www/vhosts/system/maindomain.com/conf/nginx.conf

Then let Plesk rebuild the web config for that domain and test again:
Code:
plesk repair web maindomain.com -y

or, the older way:
Code:
plesk sbin httpdmng --reconfigure-domain maindomain.com

Two more things worth checking in the panel:

- In the settings of the wildcard alias: is an alias redirect option ("Redirect with the 301 code" or similar) enabled? Combined with an HTTP->HTTPS redirect and the WordPress multisite redirects, that could build exactly this kind of loop. That's only a guess on my part, not something I can confirm from here.
- Hosting & DNS > Apache & nginx Settings: any additional directives that block or redirect?

If the 403 turns out to come from a security layer (ModSecurity / WAF, fail2ban, Imunify), the logs will show it. For ModSecurity the audit log is usually here:
Code:
tail -f /var/log/modsec_audit.log

To get more detail on the redirect loop, you can temporarily add this to the additional Apache directives of the domain (remove it afterwards, it's noisy):
Code:
LogLevel debug

Let us know what the curl output and the logs say, then we can narrow it down.

Regards
Tessa
 
OK, @tessa67, thank you for your suggestions. Let me go through them one by one.

`$ curl -skI https://sub.maindomain.com/
HTTP/2 403
server: nginx
date: Wed, 04 Nov 2026 18:28:30 GMT
content-type: text/html
content-length: 795
last-modified: Sun, 22 Jun 2025 06:00:01 GMT
etag: "31b-63822ce494b6e"
accept-ranges: bytes`

$ curl -skI --resolve sub.main.com:443:MY-SERVER-IP https://sub.main.com/
HTTP/2 403
server: nginx
date: Wed, 04 Nov 2026 18:30:36 GMT
content-type: text/html
content-length: 795
last-modified: Sun, 22 Jun 2025 06:00:01 GMT
etag: "31b-63822ce494b6e"
accept-ranges: bytes
$ tail -f /var/www/vhosts/system/blog-net.ch/logs/proxy_access_ssl_log /var/www/vhosts/system/blog-net.ch/logs/access_ssl_log /var/www/vhosts/system/blog-net.ch/logs/error_log /var/www/vhosts/system/blog-net.ch/logs/proxy_error_log
==> no output

$ tail -f /var/log/nginx/error.log /var/log/apache2/error.log
==> no output

$ grep -i "ServerAlias" /etc/apache2/plesk.conf.d/vhosts/blog-net.ch.conf
==> gives a long list of all known domains (main.com, alternate 2nd-level-domains), but NOT the sub.main.com! And NOT the wildcard domain!

$ grep -i "server_name" /var/www/vhosts/system/blog-net.ch/conf/nginx.conf
==> same list, it seems

$ plesk repair web maindomain.com -y
==> runs through nicely.
==> But after refreshing sub.main.com, still get 403 error

$ root@v2202411195655298871:~# tail -f /var/log/modsec_audit.log
Apache-Error: [file "apache2_util.c"] [line 286] [level 3] ModSecurity: Access denied with code 403 (phase 1). Matched phrase "/.git/" at REQUEST_URI. [file "/etc/apache2/modsecurity.d/rules/comodo_free/02_Global_Generic.conf"] [line "117"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "webmail.rudolflemcke.ch"] [uri "/.git/config"] [unique_id "auuEyv93mrI6f_vdunR-3AAAAMA"]
Action: Intercepted (phase 1)
Stopwatch: 1793819850737521 708 (- - -)
Stopwatch2: 1793819850737521 708; combined=283, p1=221, p2=0, p3=0, p4=0, p5=62, sr=101, sw=0, l=0, gc=0
Producer: ModSecurity for Apache/2.9.15 (http://www.modsecurity.org/); CWAF_Apache.
Server: Apache
Engine-Mode: "ENABLED"

==> This may be the only one that is point somewhere. But I am not sure what it means. Can you help me?
 
Hey @therider62,

thanks for the detailed output, that helps a lot.

About the ModSecurity entry: I'd ignore it for now. It's for a different hostname and the URI is /.git/config, which is just a bot probing for exposed git folders (the Comodo rule blocks that on purpose). Also, ModSecurity belongs to Apache, but your 403 is answered by nginx itself.

The interesting part is this: the 403 page has a Last-Modified date from June 2025 plus an ETag. That looks like a static file served straight from disk by nginx, so WordPress and Apache aren't involved at all. Combined with your grep results (neither sub.main.com nor the wildcard shows up in ServerAlias / server_name), my guess is that the request never reaches your domain's vhost and lands in some other nginx server block, for example the default one for unknown hostnames. That would also explain why none of the domain logs show anything. Just a hypothesis for now, but it fits.

Since "plesk repair web" rebuilds the configs from Plesk's database and the wildcard is still missing afterwards, I'd first check whether the wildcard still exists in Plesk at all, and in what form. In your first post you wrote "alias", later "subsite *", so please check both places in the panel: Domains > maindomain.com > Domain Aliases, and the list of Subdomains. Is *.maindomain.com in one of them?

Quick check from the console, if the wildcard is in any generated config at all:
Code:
grep -rlF '*.maindomain.com' /etc/apache2/plesk.conf.d/ /etc/nginx/plesk.conf.d/ /var/www/vhosts/system/maindomain.com/conf/

What nginx actually has loaded right now:
Code:
nginx -T 2>/dev/null | grep -n -F '*.maindomain.com'

If a wildcard subdomain exists, it may have its own folder with a literal asterisk in the name:
Code:
ls /var/www/vhosts/system/ | grep -F '*'

And to see what the 403 page says (it's only about 800 bytes, so it should tell us which page that is):
Code:
curl -sk https://sub.maindomain.com/

If the nginx log file exists on your box, watch it while you reload the subdomain, since a catch-all block would log there and not in the domain's logs:
Code:
tail -f /var/log/nginx/access.log

If the wildcard is gone in the panel: add it again the same way you had it before, then rebuild the config:
Code:
plesk repair web maindomain.com -y

If it's still there in the panel but never ends up in the generated nginx/Apache configs, that would point to a problem on Plesk's side, and I'd open a support ticket with the outputs above.

Let us know what you find.

Regards
Tessa
 
@tessa67 ist it okay to post my real domain names here, so we can easier analyse the actual situation? Or is that a definite no-no? I believe it would make our analysis part a lot easier. For example, I think you should have a quick look at the actual Let's-Encrypt-certificate, and then I can show you screenshots of what my PLESK screens actually look like.
 
@tessa67 ist it okay to post my real domain names here, so we can easier analyse the actual situation? Or is that a definite no-no? I believe it would make our analysis part a lot easier. For example, I think you should have a quick look at the actual Let's-Encrypt-certificate, and then I can show you screenshots of what my PLESK screens actually look like.
Hi, @therider62

while it isn't strictly forbidden to post your real domains, it is highly discouraged for security and privacy reasons, as publicizing server issues can attract attackers and lead to spam or unwanted Google indexing. Instead, it is much safer to use placeholders like example.com and blur out sensitive data in your screenshots while still sharing the relevant Plesk configuration details.

Regards
Tessa
 
@tessa67 okay, I will try to remember to keep anonymizing my domain names. :)

1. The wildcard domain name is featured in the PLESK "Domains" screen, as well as in the main.com "Subscription" screen, where the wildcard domain as well as all the associated 2nd-level-domains are listed below the main domain. This clean structure explains, I believe, why the Let's-Encrypt-SSL-certificate is created very clean, stating it is for the main domain, but also valid for the wildcard and all the 2nd-level-domains.

2. I do not know or understand, how the wildcard then is introduced (or missed) into the Nginx and/or Apache configuration.

Code:
grep -rlF '*.blog-net.ch' /etc/apache2/plesk.conf.d/ /etc/nginx/plesk.conf.d/ /var/www/vhosts/system/maindomain.com/conf/
==> empty output

Code:
nginx -T 2>/dev/null | grep -n -F '*.maindomain.com'
==> empty output

Code:
nginx -T 2>/dev/null | grep -n -F 'maindomain.com'
==> without the asterisk, produces lots of output, quite a number of which mention "_.maindomain.com"

Code:
ls /var/www/vhosts/system/ | grep -F '*'
==> empty output

Code:
curl -sk https://steuern.maindomain.com/
==> produces this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>403 Forbidden</title>
<link rel="stylesheet" href="/error_docs/styles.css">
</head>
<body>
<div class="page">
<div class="main">
<h1>Server Error</h1>
<div class="error-code">403</div>
<h2>Forbidden</h2>
<p class="lead">You do not have permission to access this document.</p>
<hr/>
<p>That's what you can do</p>
<div class="help-actions">
<a href="javascript:location.reload();">Reload Page</a>
<a href="javascript:history.back();">Back to Previous Page</a>
<a href="/">Home Page</a>
</div>
</div>
</div>
</body>
</html>

Code:
tail -f /var/log/nginx/access.log
==> produces no output upon refreshing the 403 URL

Code:
plesk repair web maindomain.com -y
==> produces this:
Checking web server configuration. Please wait
Repairing web server configuration for the domain maindomain.com ... [OK]

Checking php-fpm configuration
Repairing php-fpm configuration for the domain maindomain.com ...... [OK]

Checking for missing log rotation configuration files ............... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0
==> But refreshing the 403 URL still produces the 403 page.
 
All these domains point at the same servder directory /httpdocs, because the multisite wordpress installation takes care of rendering all of them individually, of course.
 
Hey @therider62,

thanks, that's very useful. First a correction from my side: I assumed the wildcard would show up as a literal "*.maindomain.com" in the config of your main domain. From what you describe, the wildcard is its own entry in Plesk (own line in "Domains", own entry in the subscription). In that case it gets its own vhost config, so it's totally normal that it's NOT in the ServerAlias / server_name list of the main domain. That means the empty grep results for the asterisk don't tell us anything, sorry for the detour.

The "_.maindomain.com" lines are very likely your wildcard (that's my guess, not something I can confirm yet). Can you show us just the server_name lines? Please anonymize the domain names again:
Code:
nginx -T 2>/dev/null | grep -n -F 'server_name' | grep -F 'maindomain.com'

About the 403 page: it references /error_docs/styles.css, so it looks like Plesk's own standard error page, served statically by nginx. WordPress and Apache aren't involved. It doesn't tell us which vhost sends it, though.

The empty access.log fits as well: Plesk writes logs per domain, so the wildcard entry should have its own log folder (probably with the underscore in the name), not the main domain's folder. Let's find it:
Code:
ls /var/www/vhosts/system/ | grep -F 'maindomain.com'

Then watch the logs of the folder that looks like the wildcard (replace FOLDER with the name from the listing) while you reload the subdomain:
Code:
tail -f /var/www/vhosts/system/FOLDER/logs/proxy_access_ssl_log /var/www/vhosts/system/FOLDER/logs/proxy_error_log

Next, in the panel, open the wildcard entry itself (Domains > the wildcard line) and check these things:
- Is its status active, or is it suspended / disabled?
- What kind of hosting is set for it (website, forwarding, or none)?
- Which document root does it use? For a multisite it normally has to point to the same WordPress folder as the main domain. Did that change recently?

I can't tell from here whether any of that is the cause, it's just where I'd look next.

If everything looks right there, you can let Plesk check and rebuild the web config for all domains (this touches every domain, so maybe do it at a quiet time):
Code:
plesk repair web -y

Let us know what you find.

Regards
Tessa
 
Thank you @tessa67

Code:
$ nginx -T 2>/dev/null | grep -n -F 'server_name' | grep -F 'maindomain.com'
637: server_name "webmail.maindomain.com";
682: server_name "webmail.maindomain.com";
726: server_name "webmail.maindomain.com";
763: server_name "webmail.maindomain.com";
2479: server_name "maindomain.com";
2480: server_name "www.maindomain.com";
2481: server_name "ipv4.maindomain.com";
2650: server_name "maindomain.com";
2651: server_name "www.maindomain.com";
2652: server_name "ipv6.maindomain.com";
2820: server_name "maindomain.com";
2821: server_name "www.maindomain.com";
2822: server_name "ipv4.maindomain.com";
2884: server_name "maindomain.com";
2885: server_name "www.maindomain.com";
2886: server_name "ipv6.maindomain.com";
5240: server_name "kabbal-on-angular.maindomain.com";
5241: server_name "www.kabbal-on-angular.maindomain.com";
5242: server_name "ipv4.kabbal-on-angular.maindomain.com";
5382: server_name "kabbal-on-angular.maindomain.com";
5383: server_name "www.kabbal-on-angular.maindomain.com";
5384: server_name "ipv6.kabbal-on-angular.maindomain.com";
5523: server_name "kabbal-on-angular.maindomain.com";
5524: server_name "www.kabbal-on-angular.maindomain.com";
5525: server_name "ipv4.kabbal-on-angular.maindomain.com";
5566: server_name "kabbal-on-angular.maindomain.com";
5567: server_name "www.kabbal-on-angular.maindomain.com";
5568: server_name "ipv6.kabbal-on-angular.maindomain.com";
8491: server_name "_.maindomain.com";
8637: server_name "_.maindomain.com";
8782: server_name "_.maindomain.com";
8824: server_name "_.maindomain.com";

Code:
$ ls /var/www/vhosts/system/ | grep -F 'maindomain.com'
_.maindomain.com
maindomain.com
kabbal-on-angular.maindomain.com

Code:
$ tail -f /var/www/vhosts/system/_.maindomain.com/logs/proxy_access_ssl_log /var/www/vhosts/system/_.maindomain.com/logs/proxy_error_log
==> no output upon refreshing the 403 page

The domain page in PLESK for *.maindomain.com says: Active
Its hosting settings say: Type: Website
Document root: /httpdocs
(and this has never changed since its creation roughly a year ago, when the whole setup was migrated from another provider)

Would there be a way for us to talk directly? I would be perfectly willing for a Remote Desktop session where you can look at my server directly, dear @tessa67

In the meantime, I was able to obtain the root password from the server owner and I am able to check anything you want.
 
Hey @therider62,

thanks, that's the most useful output so far.

Look at the server_name lines of your wildcard entry: they say "_.maindomain.com" (4 blocks), and there is no name with an asterisk anywhere in nginx for that domain. nginx compares server names literally, so "_.maindomain.com" is just an odd hostname that no visitor ever asks for. It would only match subdomains if it were a wildcard like "*.maindomain.com". So a request for sub.maindomain.com matches none of your blocks and falls back to the default server, which would explain the generic Plesk 403 page, and also why the log folder of the wildcard stays empty (that block never receives the request).

Your settings for the wildcard (Active, Website, /httpdocs) look fine, so I wouldn't expect the cause there.

Important: that's my best explanation so far, but I haven't seen the generated file itself, so please don't take it as confirmed. Could you show us the generated nginx file of the wildcard? Please anonymize the domain names again:
Code:
cat /var/www/vhosts/system/_.maindomain.com/conf/nginx.conf

And what Apache has for it:
Code:
grep -rn -F -e '_.maindomain.com' -e '*.maindomain.com' /etc/apache2/plesk.conf.d/

Here's a quick test to see whether the wildcard block works when it's addressed by its own name. It sends your subdomain request, but with the Host header of the wildcard entry (replace YOUR_SERVER_IP):
Code:
curl -skI -H 'Host: _.maindomain.com' --resolve sub.maindomain.com:443:YOUR_SERVER_IP https://sub.maindomain.com/

If that does NOT give a 403 (for example a redirect or a normal answer from WordPress), the block itself works and the problem is just that nothing matches your subdomain names to it. If it still gives the 403, the block itself is the problem.

One more question: did a Plesk update run around the time of the certificate renewal? If the generated server_name really lacks the asterisk even after a repair, that would point to a problem on Plesk's side, and then I'd report it to Plesk support (or your hosting provider) with the outputs from this thread.

About the remote session: thanks for the offer, but I'd rather keep this in the forum, and I'd really advise against handing out your root password to people here, no matter how nice they are. :p If you need hands-on help, Plesk support or a paid sysadmin is the safer route.

Let us know what the file and the curl say.

Regards
Tessa
 
Hi @tessa67

Oh, you want the whole nginx.conf file? ok, check the attachment.

Code:
grep -rn -F -e '_.maindomain.com' -e '*.maindomain.com' /etc/apache2/plesk.conf.d/
==> no output

Code:
curl -skI -H 'Host: _.maindomain.com' --resolve sub.maindomain.com:443:YOUR_SERVER_IP https://sub.maindomain.com/
45 https://sub.maindomain.com/
HTTP/2 403
server: nginx
date: Fri, 06 Nov 2026 13:47:56 GMT
content-type: text/html
content-length: 795
last-modified: Sun, 22 Jun 2025 06:00:01 GMT
etag: "31b-63822ce494b6e"
accept-ranges: bytes

Don't worry, I would never give out the root password, no, no!!! :)
I thought that, maybe, we could set up an AnyDesk Screen-Sharing session and then we can go through all the relevant screens and files together more quickly. It looks like we are in very different timezones, so, I guess, we would have to make an appointment for that. I am sitting in CET.

But it is ok. We can keep doing this. It just takes a long time. Because, to be honest, I have no clue where this may go or where the problem could be and I am very grateful that you take the time and ask me these questions that, hopefully, at some point lead somewhere.

As far as I know, there was no PLESK update going on at the same time as my certificate renewal.
 

Attachments

  • nginx.conf.anonymized.pdf
    127.2 KB · Views: 1
Hey @therider62,

thanks, that file is really helpful. Sorry, but I have to correct myself twice.

1) The wildcard IS in nginx. Line 11 of your file is a regex name (the one starting with "~^.*"), and that's how Plesk writes the wildcard for your main domain. My greps for "*." couldn't find it, my bad. The names starting with "_." look like Plesk's placeholder for the asterisk (my guess). All four blocks (http/https, IPv4/IPv6) look normal, and the HTTPS ones hand the request over to Apache on port 7081. So I don't see anything wrong on the nginx side.

2) I was also wrong that nginx serves the 403 page by itself. Look at the ETag of the 403 response: "31b-63822ce494b6e". The first part is the file size in hex (0x31b = 795, the same as the content-length), the second part is the file's modification time. That "size-then-time" order is how Apache builds ETags, nginx does it the other way round (time first, then size). And nginx replaces the "Server" header of proxied answers with its own "Server: nginx", so that header doesn't tell where the page came from. So the 403 most likely comes from Apache, behind nginx.

That also explains the empty logs: your nginx block has "access_log off;" inside "location /" (standard Plesk setup), so these requests never show up in proxy_access_ssl_log. The logs that matter are the Apache ones, and we haven't looked at those for the wildcard yet.

My current guess (just a guess): Apache has no vhost that matches the subdomain name and falls back to its default vhost, which answers with Plesk's 403 page. Let's check that.

First, send a request with a unique path and see which log file catches it (use the real subdomain name, then anonymize in your post):
Code:
curl -skI https://sub.maindomain.com/zz-test-403-7391
Code:
grep -l 'zz-test-403-7391' /var/www/vhosts/system/*/logs/access_ssl_log /var/www/vhosts/system/*/logs/error_log /var/log/apache2/* 2>/dev/null

The path of the file(s) it prints tells us which vhost actually answered (the folder name is the domain). Please post that output, anonymized.

Second, ask Apache how it maps names to vhosts. This shows the default vhosts and the wildcard aliases:
Code:
apache2ctl -S 2>&1 | grep -i -E 'default server|wild alias|namevhost _\.'

What I'm looking for: is there a "wild alias" entry for the wildcard vhost of your main domain? And which vhost is the "default server" for port 7081?

A note on your Host-header test from last time: it only means something if the Host header contained the real name from the first server_name line (the one starting with "_."). If you only anonymized it in your post, no problem. If you used the placeholder, please ignore that result.

If the wildcard is still missing in Apache afterwards, that looks like a problem on Plesk's side, and it's worth a ticket with Plesk support or your hosting provider.

Let us know what you find.

Regards
Tessa (Germany) ;)
 
@tessa67

Code:
curl -skI https://sub.maindomain.com/zz-test-403-7391
HTTP/2 403
server: nginx
date: Fri, 06 Nov 2026 15:10:36 GMT
content-type: text/html
content-length: 795
last-modified: Sun, 22 Jun 2025 06:00:01 GMT
etag: "31b-63822ce494b6e"
accept-ranges: bytes

Code:
grep -l 'zz-test-403-7391' /var/www/vhosts/system/*/logs/access_ssl_log /var/www/vhosts/system/*/logs/error_log /var/log/apache2/* 2>/dev/null
/var/www/vhosts/system/_.maindomain.com/logs/access_ssl_log

Code:
apache2ctl -S 2>&1 | grep -i -E 'default server|wild alias|namevhost _\.'
default server default-152-53-65-145 (/etc/apache2/plesk.conf.d/server.conf:103)
port 7081 namevhost _.maindomain.com (/etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf:10)
wild alias *.maindomain.com
default server default (/etc/apache2/plesk.conf.d/server.conf:65)
port 7080 namevhost _.maindomain.com (/etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf:211)
wild alias *.maindomain.com
(There were two other domains that have nothing to do with us, so I deleted those lines.)

I am not sure what you mean with your Host-Header comment, but I always de-anonymize your command suggestion, execute it, and then anonymize the resulting output.

In the last output, we see port 7081, naming both _.maindomain.com and the "wild alias" *.maindomain.com.

Are we getting anywhere with this? :)
 
Hey @therider62,

quick update, I think we're getting close. The 403 is almost certainly coming from Apache, not nginx (the ETag format gives it away, as Tessa already spotted). And your grep -l test showed the request DOES land in the wildcard vhost's access log — so the vhost receives it, but something inside it throws the 403.

Two things I'd check next, in this order:

1) Make sure the Host-header test last time was actually meaningful. The first server_name in the Apache vhost is probably NOT the literal "_.maindomain.com" placeholder. Please pull the real value:
Code:
grep -A5 -i 'namevhost' /etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf | head -20
Then repeat the curl with that exact name as Host header (real domain, de-anonymize for the test):
Code:
curl -skI -H 'Host: <REAL_FIRST_SERVERNAME_FROM_ABOVE>' --resolve sub.maindomain.com:443:YOUR_SERVER_IP https://sub.maindomain.com/
If it still gives 403, the vhost itself is the problem. If it gives anything else, the problem is host matching.

2) The most useful thing right now is the Apache error log of the wildcard vhost. Watch it while you fire a test request:
Code:
tail -f /var/www/vhosts/system/_.maindomain.com/logs/error_log
and in another terminal:
Code:
curl -skI https://sub.maindomain.com/zz-test-403-7392
Whatever shows up there will tell us exactly which Apache directive is denying the request (Require, Directory, redirect loop, whatever).

While you're at it, also dump the relevant bits of the vhost config:
Code:
grep -n -E 'Require|Deny|Allow|DocumentRoot|Redirect|Directory' /etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf
Especially check whether DocumentRoot still points to /var/www/vhosts/maindomain.com/httpdocs.

The AH00124 redirect-loop line in the main log is interesting but not confirmed to be from your subdomain request — don't chase it yet, only if step 2 shows it.

Post the outputs (anonymized) and we'll know which way to go.

Regards
Tessa
 
Code:
grep -A5 -i 'namevhost' /etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf | head -20
not output
There is no 'namevhost' entry in that file, so I just tried maindomain.com in the following command.

Code:
curl -skI -H 'Host: maindomain.com' --resolve sub.maindomain.com:443:152.53.65.145 https://sub.maindomain.com/
HTTP/2 200
server: nginx
date: Fri, 06 Nov 2026 16:00:14 GMT
content-type: text/html; charset=UTF-8
x-powered-by: PHP/8.5.12
link: <https://maindomain.com/wp-json/>; rel="REST API Handbook | Developer.WordPress.org", <https://maindomain.com/wp-json/wp/v2/pages/3>; rel="alternate"; title="JSON"; type="application/json", <MainDomain>; rel=shortlink
access-control-allow-origin: https://www.speedcheckercdn.com
strict-transport-security: max-age=15768000; includeSubDomains
x-powered-by: PleskLin

Code:
tail -f /var/www/vhosts/system/_.maindomain.com/logs/error_log
[Fri Nov 06 17:02:30.415145 2026] [proxy_lock:warn] [pid 3935792:tid 139803861444288] [client 212.51.137.8:0] proxy_lock: refused proxy backend unix:/var/www/vhosts/system/maindomain.com/php-fpm.sock for /index.php, referer: https://sub.maindomain.com/

Code:
grep -n -E 'Require|Deny|Allow|DocumentRoot|Redirect|Directory' /etc/apache2/plesk.conf.d/wildcards/maindomain.com.conf
77: DocumentRoot "/var/www/vhosts/maindomain.com/httpdocs"
98: Require valid-user
111: <Directory "/var/www/vhosts/maindomain.com/httpdocs">
126: SSLRequireSSL
130: </Directory>
132: <Directory "/var/www/vhosts/maindomain.com">
134: </Directory>
136: <Directory "/var/www/vhosts/system/_.maindomain.com/statistics">
141: </Directory>
159: DirectoryIndex "index.html" "index.cgi" "index.pl" "index.php" "index.xhtml" "index.htm" "index.shtml"
161: <Directory "/var/www/vhosts/maindomain.com">
163: AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,SymLinksIfOwnerMatch,MultiViews,ExecCGI,Includes,IncludesNOEXEC
164: </Directory>
178: # Require all granted
179: Order Deny,Allow
180: Allow from all
185: # Require all denied
186: Order Allow,Deny
187: Deny from all
195: # Require all granted
196: Order Deny,Allow
197: Allow from all
202: # Require all denied
203: Order Allow,Deny
204: Deny from all
 
Back
Top