Plesk 10 Upgrade – WWW Site Prefix Shows Default Page
A recent upgrade from Plesk 9 to Plesk 10 resulted in us experiencing an issue where the Plesk Default Page is shown for the WWW prefix for a number of sites. Turns out it is a documented issue however the Parallels suggested solution hardly scales.
This is frustrating, very frustrating. Someone might want to send a copy of the relevant DNS RFC to Parallels as its also plain wrong.
Disclaimer: I won’t be held liable for any data loss, downtime or customer angst as a result of the following. While this will work in most environments, YMMV. Backup your PSA database before starting.
First step is to create a small shell script (Ie. vim /root/fixissue.sh) containing the following
#! /bin/csh
foreach domain (`cat /root/domains`)
/usr/local/psa/bin/dns --add $domain -cname 'www' -canonical $domain
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain $domain
echo $domain Fixed
end
Following this, complete the following. This could also be scripted without effort.
echo "select host from dns_recs WHERE host LIKE 'www%' AND type = 'A';" | mysql -N -uadmin -p`cat /etc/psa/.psa.shadow` psa > /root/domains
sed -i 's/^.\{4\}//g' /root/domains
sed -i 's/\.$//' /root/domains
echo "delete from dns_recs WHERE host LIKE 'www%' AND `type` = 'A';" | mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
chmod u+x /root/fixissue.sh
/root/fixissue.sh

Hi Nick, found this page after pulling my hair out after upgrading to Plesk 10. Saved me a lot of time. The only error I got was copy+pasting the line with the mysql delete command. I just ran the query in phpmyadmin. Besides that everything works great!
GREAT!
Every now and then I’m frustrated with some new issue (althou I should have learn by now after 30 years of computing, still…). This was great help.
Thank you.
Great… Helped a lot.
Thanks for posting this. Just did up a system (Oct 2011) and it warms my heart to report that Plesk is still being sold and deployed broken. But with a little help from Google and some great documentation from people like you, almost anyone can fix it! Well, anyone accept the company selling it broken who now has for almost 1 year NOT FIXED IT!
Ah, the joys of computing..It wouldn’t bother me at all if it was an open source product and this was required, but not this product costs a grand! and from where my brain actually decodes the words ‘Commercial Business Transaction’ that pretty much violates my concept of the terms, quality product, customer support and
But it really does a good job of defining this term. “They Got Your Money, That is All They Care About”