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

Any subdomain to main folder, but www.domain to subdomain folder

Discussion in 'Plesk 9.x for Linux Issues, Fixes, How-To' started by shitz@mail.ru, Jan 30, 2011.

  1. shitz@mail.ru

    shitz@mail.ru Guest

    I have situation below.

    I need that any subdomain goes to main folder /var/www/vhosts/domain/httpdocs and that is reached with A record
    *.domain.com A server's IP

    but www.domain.com must be opened from another folder. I have created subdomain www for that. Thus page must be loaded from /var/www/vhosts/domain/subdomain/www/httpdocs

    Everything is working if I edit /var/www/vhosts/domain/conf/httpd.include file though I must move script for www.domain.com subdomain before main virtual host like this

    But Plesk will restore httpd.include file. Therefore I've created vhost.conf file and now there:

    And Now, if I go to domain.com, www.domain.com or something.domain.com the folder /var/www/vhosts/domain/httpdocs is used.

    What I should to do at vhost.conf file?
    Last edited by a moderator: Jan 30, 2011