• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

www and wildcard subdomain as seperate domains

J

Johand

Guest
I've got a small (read: big) problem with a wildcard; here's the setup:

There's a client with 2 domains configured: www.example.com and example.com (without www)
These domains have their own hosting, since they have different sites.

example.com is configured with a wildcard subdomain;
"*.example.com CNAME example.com" in DNS
"ServerAlias *.example.com" in vhost.conf
www.example.com is standard, except that it only accepts www (or subsubdomains like test.www.example.com)

The problem is, after I configured the DNS and vhost.conf, I can't access the WWW site, but it goes to the wildcard site.

Is there a simple solution to fix this like excluding www from the wildcard or doing a query on the psa database, or do I have to rethink/rebuild the configuration?

I did find some possible reasons due the order of the domains at the psa database (wildcard is before www) which means that apache first sees the wildcard and stops instead of checking for the www part.

Some help will be very usefull.
 
Problems

John,

You need to tell what distribution you are using. Are you using Windows 2000X or Linux? It makes it easier to give you an answer.

Windows allows for multi-domain usage on SSL where as Linux only allows for single SSL usage per domain.

So in your case we need to know your distribution for an exact answer
 
Hi Chris,

The problem is not related to SSL, the problem is that the order of domains is fixed by the order of creation date/time.
Therefor the httpd.conf for the wildcard domain is loaded before the www domain, so www isn't seen by Apache, since it stops at the wildcard configuration.

If I first create the fixed subdomains (like www) and then the wildcard everything works as expected.
When I add a new fixed subdomain (eg. admin.example.com) it won't work and goes to the wildcard setup.

It's very annoying, because I do need the wildcard, but in the meantime I do need to add extra subdomains dynamicly, so I can't delete and recreate the wildcard everytime I've got a new (fixed) subdomain.

But, in case does help:
Plesk: 9.3.0
OS: Red Hat 4.1.2
 
Back
Top