500 Server Error from Subdomain with specific mapping?

I have an issue that is a head-scratcher.

I am hosting domain.com without any issue. It is a wordpress install and running well.

I add a folder called subfolder inside the public_html folder of domain.tld.

I add subdomain.domain.tld (same user account and IP), but I point that to the document root I want (/home/web/domain.tld/public_html/subfolder). I have already added the A record via DNS and all is pointing correctly.

When I go to subdomain.domain.tld, I am getting a 500 error.

I have been told that this is because of the htaccess file and the <IfModule. Why would that be a limiter on the subdomain?

I am running on Nginx with the Apache reverse proxy method. Ubuntu 20. MariaDB and PHP7.4 (php-fhm).

Apache .htaccess also works if it it one level higher. Why not keep it in his own public_html folder?

This sounds like a openbasedir issue, check your webserver log.

  1. First you create DNS record subdomain.domain.tld then make record A put your Ip address then save
  2. Add Web domain dont select Create DNS zone and Enable mail for this domain then save
    your sub domain will be created