• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 7.5, vhost.conf and changed docroots

S

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
 
Back
Top