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

Document Root

Discussion in 'Plesk for Linux - 8.x and Older' started by scottthepotter, Sep 23, 2007.

  1. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    When I change the document root served websites, occasionally and whenever I reboot the server Plesk reconfigures them to be /var/www/vhosts/domain-name/httpdocs. How do I keep Plesk from doing this?
     
  2. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Sounds like the change is not persistant, how are you setting the value?
     
  3. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    I am using the Apache webmin module (since there isn't a way to do this in Plesk) but I am not sure where Webmin makes those changes.
     
  4. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    When you change the value there does it update in the psa.conf file?
     
  5. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    Since the psa.conf file I am guessing is a Plesk configuration file, then probably not. Is that where I should set the document roots in the psa.conf file?
     
  6. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    if I remember correctly it is

    Code:
    cat /etc/psa/psa.conf | grep 'HTTPD_VHOSTS_D'
    
    if you change it here I believe you also have to reconfigure all your existing vhosts as well as restart psa

    I could be mistaken though, so try at your own risk - but let me know if works for you.
     
  7. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    I believe that this will only change the vhost directories for all virtual sites. Not specific ones. Currently Plesk has the directory set for /var/www/vhosts then within that, the document root is set to domain-name/httpdocs, although I am not sure what sets that as it is not in the httpd.conf file. Webmin actually allows you to change document root of each virtual host to anything within that virtual host directory. So I could change the root to /var/www/vhosts/<domain-name>/httpdocs/joomla. I can't figure out where Webmin is getting this information from though. When I change the document root here it stays for a "period of time". Usually until I upgrade Plesk or physically restart the server then everything reverts back to /var/www/vhosts/<domain-name>/httpdocs. Plesk is a nice interface for the end user who wants to manage their domain settings and it is "okay" for administering web services, but there are too many things that you just can't get to with it. And if you make a change outside of Plesk then you have to deal with the consequences of how Plesk reacts.
     
  8. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    oh, ok I think I finally understand what you mean then, sorry.
    I also think I see the problem.

    If you go to
    and then search for the doc root

    You see it show up in a few places.

    One of them should look like:
    Now you can change that and it will take effect once you restart apache. But the problem is that a lot of the times when psa restarts, reboots, or the domain has a change that occurs in plesk the httpd.include file gets overwritten each time - so all changes are lost.

    You will need to put the changes into a vhost.conf file there instead and then do the reconfigure command

    /usr/local/psa/admin/bin/websrvmng -u --vhost-name=<domain>[/QUOTE]

    I think you just have to add

    But to make this overly simple, wouldnt it just be easier to move the web site to the root instead?
     
  9. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    Actually I was thinking " to make it overly simple wouldn't it be great if Plesk allowed me to change my document root on a virtual host basis"? It is strange because I "rent" my server from 1and1 and if you use 1and1's shared hosting you can actually do this from within their control panel, which is home grown not cpanel not plesk. But you are probably right, might be easier in the long run to move the site up one level. Thanks for trying though.
     
  10. scottthepotter

    scottthepotter Basic Pleskian

    24
    73%
    Joined:
    Jun 4, 2007
    Messages:
    51
    Likes Received:
    0
    Okay, here is an interesting discovery. None of the domains that I am hosting has a vhost.conf file in the <domain-name>/conf folder. The only file in that folder is an httpd.include file which makes reference to the vhost.conf in the comments section and says that it should be in this same folder.
     
  11. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    no domain has one by default unless you create it in the skeleton directory. You need to create one manually for any domain you wish to have a permanent server setting change
     
Loading...