So I'm working in DA, and attempting to add a wildcard subdomain in order to direct all non-existent subdomains to the webroot of the main domain. This is simple by adding a wildcard ServerAlias. However, in my case, I have an actual subdomain which has it's own docroot defined. As of right now, the contents of the httpd.conf file for domain.tld looks like this:
The only problem is that, since the wildcard ServerAlias was added to the main domain, the actual subdomain does not get reached. I need to switch these around so that all VirtualHost contents for existing subdomains is printer BEFORE domains. I'm just not sure how to go about doing that, so any help would be greatly appreciated.
Code:
<VirtualHost 11.22.33.44:80 >
ServerAlias *.domain.tld
ServerName www.domain.tld
ServerAlias www.domain.tld domain.tld
[...]
</VirtualHost>
<VirtualHost 11.22.33.44:80 >
ServerName www.sub.domain.tld
ServerAlias www.sub.domain.tld sub.domain.tld
[...]
</VirtualHost>
The only problem is that, since the wildcard ServerAlias was added to the main domain, the actual subdomain does not get reached. I need to switch these around so that all VirtualHost contents for existing subdomains is printer BEFORE domains. I'm just not sure how to go about doing that, so any help would be greatly appreciated.