• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • 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.

Problem with DNS on subdomain

Hello,

This maybe related not to DNS problem but to apache configuration. By default Plesk does not add any records for www.subdomain.domain.tld in apache configuration files - as result you get default Plesk page.

To make sure that it is not DNS issue run command:
host www.subdomain.domain.tld

If it will show that www.subdomain.domain.tld resolves to another ip then you should make sure you have A record for www.subdomain.domain.tld in domain.tld DNS settings.

If it will show that www.subdomain.domain.tld resolves to ip address of Plesk server then we will just need to correct apache configuration.

To correct apache configuration to allow hosting of www.subdomain.domain.tld you should do changes suggested in article below:
http://enarion.net/web/plesk/plesk-subdomain-www/

A correction to this article:
1. Subdomain configuration path (this is where you will need to create vhost.conf) is:
/path_to_vhosts/<domain-name>/subdomains/<subdomain-name>/conf/

Where /path_to_vhosts/ is usually /var/www/vhosts. It can be clarified in /etc/psa/psa.conf configuration file.
 
Unfortunately, it didn't help. I even ran this script:
Code:
#!/bin/bash
if !(grep -q "ServerAlias www.$1.$2" /var/www/vhosts/$2/subdomains/$1/conf/vhost.conf > /dev/null 2&>1)
then
echo ServerAlias www.$1.$2 >> /var/www/vhosts/$2/subdomains/$1/conf/vhost.conf
fi
/opt/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=$2 > /dev/null 2&>1
/usr/local/psa/bin/dns.sh --add $2 -cname www.$1 -canonical $1.$2.
/usr/init.d/bind9 restart > /dev/null 2&>1
/usr/sbin/apache2ctl -k graceful > /dev/null 2&>1
echo Subdomain $1.$2 has been set up!
but it's still not working. It's redirecting www.subdomain.* to domain from my hostname, doesn't related to domain of subdomain (also www.anything.domain.tld). Maybe the reason is external DNS server? But i didn't have this problem without Plesk on current DNS configuration.
 
Back
Top