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

/httpdocs for second-level domains

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by cpes, Jan 2, 2011.

  1. cpes

    cpes Guest

    0
     
    Hello,

    i noticed different folder structure in plesk 10.

    httpdocs for first (main) domain name is created under:
    /var/www/vhost/main-domain.com/httpdocs

    When customer hosts multiple domains, other domain names are created this way:

    a) Configurations, logs, statistics, etc:
    /var/www/vhost/new-domain.com

    b) httpdocs folder for second domain is created in main domain folder:
    /var/www/vhost/main-domain.com/site1

    (usually it was /var/www/vhost/new-domain.com/httpdocs)

    Is this ok or is it a bug?
    Why is it good for to have all httpdocs for all domains under main domain folder?

    Regards!
     
  2. lhwparis

    lhwparis Guest

    0
     
    thats ok. no bug.
    in plesk10 this is a new structure. subdomains and alias domains have no own httpdocs folders. they all point to folders into the main httpdocs folder
     
  3. cpes

    cpes Guest

    0
     
    I understand for alias domains or subdomains. But these are not alias domains or subdomains. They're regular domain names (e.g new-domain.com). And httpdocs is not created in folder:

    /var/www/vhosts/new-domain.com/httpdocs

    but it is created under primary domain name:

    /var/www/vhosts/main-domain.com/site1

    I was looking in administrator's guide for explanation but no luck for now. Can you explain why is that so?
     
  4. fogelf

    fogelf Regular Pleskian

    23
    37%
    Joined:
    Feb 10, 2010
    Messages:
    103
    Likes Received:
    0
    When U create subscription, U also provide domain name. Let it will be "main domain". On file system it looks like:
    ---------------------------------------------------------------------
    # ls -1 /var/www/vhosts/$WEBSPACE_NAME/
    anon_ftp
    cgi-bin
    conf
    error_docs
    httpdocs
    pd
    private
    statistics
    subdomains
    web_users
    a10-52-36-49:~#
    ---------------------------------------------------------------------

    If U create new domain (or subdomain) for "main domain", its DocumentRoot is placed into /var/www/vhosts/$WEBSPACE_NAME/, for example I've create new domain called addon1.com with Document root = 'site1':
    ---------------------------------------------------------------------
    # ls -1 /var/www/vhosts/$WEBSPACE_NAME/
    anon_ftp
    cgi-bin
    conf
    error_docs
    httpdocs <<< documentroot for "main domain"
    pd
    private
    site1 <<< document root for new domain
    statistics
    subdomains
    web_users
    a10-52-36-49:~#
    ---------------------------------------------------------------------

    i.e. all documentroot (by default) are placed in "main domain" FTP user home directory.
     
  5. DCR

    DCR Guest

    0
     
    fogelf, if this is really the case it sounds like an incredible dumb idea for Plesk10, since subdomains in many cases would have a totally different application living on them. Not necessarily managed by the same peopel (ftp account).

    Personally I have not seen that yet, as I migrated all my domains (and aliases + subdomains) from another server of mine with a Plesk 9 installation, and I just checked. The migration did not move my domains into this new structure but instead kept the old one (where the subdomain structure is with a document root in "...../main-domain-name/subdomains/sub-domain-name/httpdocs").

    So I guess I might see this new structure mixed in with the old structure when I create new domains under Plesk 10. That will be interesting (NOT) to see different document root structure for different sub domains. Some of my current backup logic will definitely go heywire.
     
  6. JimUK

    JimUK Guest

    0
     
    I thought it would be simple enough to be able to set up separate subdomains with separate users, so that I could minimise any risk of easily or accidentally breaking another app.

    So basically, I thought it could simply be set up like this:

    vhosts/
    api.mydomain.com/ (user A)
    httpdocs/
    app1.mydomain.com/ (user B)
    httpdocs/
    app2.mydomain.com/ (user C)
    httpdocs/
    www.mydomain.com/ (user D)
    httpdocs/


    ...rather than:

    vhosts/
    www.mydomain.com/ (user A)
    httpdocs/
    api.mydomain.com/
    app1.mydomain.com/
    app2.mydomain.com/


    So I thought, that it would probably be necessary to create different subscriptions for each user, but a subscription is based a top level domain i.e. mydomain.com so I am unable to do this.

    Any ideas on what I'm doing wrong?
     
  7. MarvS

    MarvS Guest

    0
     
    Adding Domains under subcription

    I am also mystified by this new structure in Plesk 10. I want to be sure that I am clear about this:

    The expected behavior by Plesk 10 is that new domains, not sub domains, created under an existing subscription are added to the already existing directory structure from the domain initially created with the subscription?

    This seems to go against all convention. I would be interested in the thought process that went into this?

    -Mark

    I would add that this has been driving me crazy as I setup a new Plesk 10 server!
     
    Last edited by a moderator: Jan 29, 2011
  8. EgidijusS

    EgidijusS Regular Pleskian

    23
    23%
    Joined:
    Jan 22, 2010
    Messages:
    183
    Likes Received:
    0
    Location:
    Vilnius, Lithuania
    It realy drives me crazy. Looks that plesk going down with new "briliant" ideas. As I see with every new version is more complicated to understand logic. I hope there is answer why was implemented in that way.
     
  9. MarvS

    MarvS Guest

    0
     
    I must say that after my initial displeasure, and after working with it a bit, I am beginning to see some benefit to this new directory structure. I am not saying that sticking with convention would not have been a better course, but this method does have an advantage, at least for me, in that I can use one login for each site that I run. That works for me but I could see where it would not work well for others.
     
  10. lhwparis

    lhwparis Guest

    0
     
    me too! i like the new structure. yes its different from the old one but old one was not the best solution.
    you have to do some things different with the new structure but you can do more things with it.
     
  11. mkrve

    mkrve Guest

    0
     
    hmm... i recently updated to the latest plesk..
    but i can not get used to the new structure yet.
    If you have a few domains under 1 user, which also all have a few sub-domains, you realy get lost easy when i ssh on the server. you realy have to use good folder names for all the domains and subdomains to easy see which is which.

    how do you guys handle this?
    what kind of naming do you use for all the domain and subdomain root folders??
     
    Last edited by a moderator: Jul 5, 2011
  12. Johnny V

    Johnny V New Pleskian

    12
    80%
    Joined:
    Nov 22, 2011
    Messages:
    6
    Likes Received:
    0
    multiple directories for each subdomain

    I don't mind the subdomain not being in the /mydomain.com/subdomain/ directory but why does it create two seperate other directories within 10.4.4?

    For each subdomain it creates the following two directories under /var/www/vhosts/

    mydomain.com
    - mysub (i can set this)
    mysub.mydomain.com
    - anon_ftp
    - conf
    - error_docs
    - pd
    - private
    - statistics
    - subdomains
    - web_users

    What is the point of the mysub.mydomain.com one right under ../vhosts/? I would understand if the website files were also within mysub.mydomain.com, but they're under the TLD.
     
  13. fogelf

    fogelf Regular Pleskian

    23
    37%
    Joined:
    Feb 10, 2010
    Messages:
    103
    Likes Received:
    0
    in 10.4.4 system directory of domain/addon/domain/subdomain is stored in vhosts/$OBJECT_NAME
    But DocumentRoot of all objects above is inside system directory of "main" domain)

    example:
    domain: webspace.com has addon domain addon1.webspace.com and subdomain subdomain1.webspace.com

    ls vhosts/
    webspace.com
    addon1.webspace.com
    subdomain1.webspace.com

    ls vhosts/webspace.com
    anon_ftp
    bin
    cgi-bin
    conf
    dev
    error_docs
    etc
    httpdocs - main domain (webspace.com) docroot
    httpdocs_domain - addon domain (addon1.webspace.com) docroot
    httpdocs_subdomain - subdomain (subdomain1.webspace.com) docroot
    lib
    pd
    private
    site1
    statistics
    subdomains
    tmp
    usr
    var
    web_users
     
  14. FollowTheMedia

    FollowTheMedia New Pleskian

    13
    35%
    Joined:
    Aug 26, 2011
    Messages:
    14
    Likes Received:
    0
    There's no way I can easily get a simple PHP script work with this kind of structure.

    The primary domain is located at /var/www/vhosts/primarydomain.com
    The secondary domain is located at /var/www/vhosts/primarydomain.com/secondarydomain.com but there's also the nameholder at /var/www/vhosts/secondarydomain.com

    Well, my PHP script lies in /var/www/vhosts/primarydomain.com/secondarydomain.com so when I try to set the proper open_basedir switch to {DOCROOT}:/tmp/ it simply does not work because {DOCROOT} is /var/www/vhosts/secondarydomain.com but the script lies in the other folder.

    I cannot manually fix it though. /var/www/vhosts/secondarydomain.com/etc/php.ini never changes, despite of what I write into the proper textbox in the PHP configuration tab (before you ask... yes: I'm working on the secondarydomain.com configs and not primarydomain.com ones).

    I had to manually edit it through SSH.
     
    Last edited: Jul 13, 2012
  15. FollowTheMedia

    FollowTheMedia New Pleskian

    13
    35%
    Joined:
    Aug 26, 2011
    Messages:
    14
    Likes Received:
    0
    So, because you - from the pedestal made of CISCO certifications - think it's better, we must accept this fact in full appeasement.
    How democratic.

    However I really don't care about the new structure of directories: I just want that PHP scripts run correctly on secondary domains without any need to manually edit php.inis through shell
     
    Last edited: Jul 17, 2012
  16. IanJ1965

    IanJ1965 New Pleskian

    10
    35%
    Joined:
    Jan 9, 2013
    Messages:
    7
    Likes Received:
    0
    Hi all,

    Just got my new server going and was dumbfounded to come across this issue.

    Is there are workaround yet, or perhaps anupdate from Parallels..............I just see it as very untidy that any additional domains I add the webroot sit as a sub-folder of my main domain.

    Thanks,

    Ian.

    UPDATE:

    SUPPORT SAYS:
    If you are creating a new domain under same subscription, it will be using the vhost location under main subscriptions httpdocs.
    If you need to use it as per "/vhost/new-domain.com/httpdocs", you need to create a new subscription for every new domain. Please try to create a new subscription for every domain which you want to create.
     
    Last edited: Jan 9, 2013
  17. aashua

    aashua Guest

    0
     
    This step in new some prople won't understand

    I have made each and every steps with full details:

    Here is the link for your solution and understanding what is this and how to manage:
    Similar KB : Click here.

    All related Similar KBs:
    Click here.

    I hope this helps.
     
  18. Alan_K

    Alan_K New Pleskian

    10
     
    Joined:
    Jan 23, 2013
    Messages:
    1
    Likes Received:
    0
    Same problem....any updates?

    I am experiencing an issue with this as well. I have 2 domains setup in the same webspace. There are redirect settings saved in the /var/www/vhost/main-domain.com/conf/vhost.conf file, which work fine for the main domain, but seem to have no affect on the second domain. I noticed in one of the posts that the new domain has its own conf folder at /var/www/vhost/new-domain.com/conf - but I am unsure of how to navigate to this directory to update the file!

    Also - possibly related - I want both the main domain and the second domain to use the same PHP settings. I thought I could accomplish this by setting the PHP settings under the Server tab, in Custom View Settings - however the changes that I made there seemed to have no affect on either domain. The only way that I could affect the PHP settings was to go into each domain separately in the Websites & Domains tab and edit the individual domain settings.

    Does anyone have any ideas on how to fix either of these?? I would rather not create a new webspace for the second domain since both domains share the same template files and databases.
     
Loading...