1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

New to VPS and PLESK / Virtuozzo - Need Help plz

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by LAM09, Jan 11, 2011.

  1. LAM09

    LAM09 Guest

    New to VPS and PLESK / Subdomains Not working Properly

    Hi, really sorry if some of these questions sound really easy, but I am new to VPS, PLESK and Virtuozzo.

    I cannot get PLESK 9.5 to recognise my subdomains under the main domain. They seem to sit outside of the domain which make administering / maintaining a nightmare from a web designers point of view. How can I get this back inside the domain (they way that CPANEL handles it?)?

    On creating the Subdomains, I added DNS records - CNAME and A records. However, the content is only displayed without the www and with the www is just the plesk welcome page.

    <domain>. A <IP>
    www.<domain>. CNAME <domain>.

    <subdomain>.<domain>. A <IP>
    www.<subdomain>.<domain>. CNAME <sudomain>.<domain>.

    The first works on the top level domain, redirecting the URL without the ww (via htaccess). The second one - the redirect works via htaccess BUT it just redirects to the PLESK welcome page - any clues?
    Last edited by a moderator: Jan 12, 2011
  2. LAM09

    LAM09 Guest

    Just to update so anyone who's having the same problem can get a resolution on this. I was fortunate enough yesterday to get the very clear help from a PLESK legend since PLESK version 1 and Parallels forum user since 2002, called "stupidnic" (he really is NOT stupid)

    Anyway - here is the process he showed me for fixing the two issues above - it uses a "symbolic link" to get the content from the domain subfolder.

    PLEASE NOTE: The process below assumes that you have a designated folder under the main domain which contains the subdomain web files.

    1) In PLESK panel, under the domain, create the Subdomain. This will put the source files for the subdomain at the very root of the domain itself (not under httpdocs but under a folder called subdomain).

    2) Add DNS records for the subdomain using the format of so it recognises both ways of accessing the URL - changing of course MySubdomain & Mydomain to the correct names.
    <subdomain>.<domain>. A <IP>
    www.<subdomain>.<domain>. CNAME <sudomain>.<domain>.

    3) Access the newly created subdomain folder as root (I did this by clicking on virtuozzo, file manager and then navigating to it via /var/www/vhosts/MyDomain/subdomains/ and then deleting the httpdocs folder under the subdomain.

    4) Still in the same location, go to the CONF folder and create a vhosts.conf file and put the following in - again changing to the correct names (without the www)
    <Directory /var/www/vhosts/MyDomain/subdomains/MySubdomainNAme/httpdocs>
    php_admin_value open_basedir "/var/www/vhosts/MyDomain:/tmp"
    Options FollowSymLinks
    <Directory /var/www/vhosts/MyDomain/subdomains/MySubdomainNAme>
    Options FollowSymLinks
    ServerAlias www.MySubdomainNAme.MyDomain

    5) Now I just needed to execute a couple of commands. I did this via mac terminal, on an SSH connection logging in as SSH root@myserver and then typed in

    ln -s /var/www/vhosts/MyDomain/httpdocs/MySubdomain/ /var/www/vhosts/MyDomain/subdomains/MySubdomain/httpdocs (hit enter) THEN
    /usr/local/psa/admin/bin/websrvmng (and hit enter)

    5) Went to the URL (gave it an hour to make sure all the changes took place). YES, I could access my web content on both http://www.subdomain.mydomain.com & http://subdomain.mydomain.com which it was pulling from a folder under the main domain (which makes administering the site a lot easier)