• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Subdomains issue

D

djason

Guest
Hi I have a question to make regarding the subdomains creation!!!!

I have created a subdomain via Plesk 8.4, but I cant visit my subdomains when I am typing www.subdomain.domain.tld, but i can see them when i type subdomain.domain.tld.

Can you help me on how to solve this???


Thank you in advance
 
I've made myself a bash scritp to cover that, but you have tu run it for every subdomain.

#!/bin/bash

#cd /var/www/vhosts/$2/subdomains/$1/conf

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!


You use it like this (for forum.domain.com, name of file with above script: wwwdomain): ./wwwdomain forum domain.com
 
Thank you for your reply meto!!!

I ve done almost the same without writing a script, I made the changes into the conf file of the domain and it worked, but when I restarted the apache everything was changed again and became as it was before the changes that I made... isnt that strange?

Is this a bug of 8.4 version??

Thank you anyway I ll copy your script and I will see how it works.
 
It does for me :) Its not a bug its a FEATURE! :p Subdomains NEVER had www prefix included (as far as i remember, wich is PLESK 7.5 Reloaded).
 
Back
Top