Nickbrown.com.au

Internet, Hosting, The Australian Marketplace and a bunch of inane ramblings.

18 November 2010 9 Comments

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

9 Responses to “Plesk 10 Upgrade – WWW Site Prefix Shows Default Page”

  1. David S. 22 December 2010 at 9:28 am #

    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! :)

  2. Kristijan 8 January 2011 at 3:04 pm #

    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.

  3. VPS Hosting 15 July 2011 at 3:48 pm #

    Great… Helped a lot.

  4. Timothy Tuck 24 October 2011 at 5:56 pm #

    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”


Leave a Reply