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

Plesk 7.5, vhost.conf and changed docroots

Discussion in 'Plesk for Linux - 8.x and Older' started by Salgermissen, Oct 30, 2007.

  1. Salgermissen

    Salgermissen Guest

    Hi folks,

    i am having some trouble with configuring a domain to use a
    different documentroot.

    Since Plesk 7.5 doesn't offer this in the Menues, i tried to
    manualy configure this. After some tryouts with the httpd.conf
    of the domain, i figured that the vhost.conf is the correct file
    to make changes to ...

    But this vhost.conf file is giving me some headaches:

    Problem 1:

    I want to change the docrot of Domain B. I copy the contents of
    httpd.conf into the vhost.conf and change the path's and the user
    to those of Domain A(this works if done in httpd.conf).

    But when trying to make plesk take over the changes with
    /usr/local/psa/admin/bin/websrvmng -a -v
    i get an error-message that the httpd-service fails to restart gracefully.
    Obviously the vhost.conf doesn't except the same syntax as the httpd.conf.
    What commands do i have to use inside the vhost.conf to make that
    vhost point to another docroot, especialy with the correct user for
    that changed path??

    Problem 2:
    I try to add a RedirectMatch to the vhost.conf:
    RedirectMatch ^/resume(.*)$ http://www2.<domain>.com/resume$1
    (fetches URLs with /resume and redirects them to www2.*)

    Now i want Plesk to take over these Changes with
    /usr/local/psa/admin/bin/websrvmng -a -v
    and i restart the apache.

    Unfortunatly, this doesn't do anything. It's like my redirect gets
    totaly ignored. If i add this line to the httpd.conf, it works perfect. (Until Plesk changes the file ...)

    Problem 3
    Is there a way to make plesk only update the vhost.conf/httpd.conf
    of one vhost? My command alsways resets all httpd.conf siles for
    all vhosts ...

    Thanks for any help