Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a customer who has a domain hosting on a plesk (8.2) server.

Now I want to configure different webroots for his domain alias.

The domain www.customer1-brandname.tld points at

/srv/www/vhosts/customer1/httpdocs/

That domain has an alias www.customer1-newbrandname.tld

which actually shows the same content. Now I want to configure plesk to use

/srv/www/vhosts/customer1/httpdocs/new_site/

as a webroot, If someone navigates his browser to www.customer1-newbrandname.tld which contains a new website, which is currently accessible by navigating to

http://www.customer1-brandname.tld/new_site/
http://www.customer1-newbrandname.tld/new_site/

The problem is that I can't just use a new physical hosting, because both sites share the same database, and the customer e-mail accounts are using both domains.

Is this possible?

Maybe with an entry in the vhost.conf file? Or with a Rewrite rule in apache itself.

share|improve this question
    
I don't think you can change DocRoot in apache config (will be overwritten by next change in Plesk). Rewrite rule can be a solution –  Sergey L Jun 19 '12 at 8:44
    
I can do it (and did it for the customer) in the vhost.conf DocumentRoot /srv/www/vhosts/customer.tld/httpdocs/typo3 but I can't configure this per domain, since both share one virtualhost entry. –  SchlaWiener Jun 20 '12 at 9:45
    
Maybe try to put the additional config file in /etc/httpd/conf.d (assuming it's an RHEL,CentOS or Fedora OS) with the needed vhost configuration, this one shouldn't be overwritten. –  Logic Wreck Jun 20 '12 at 11:51
    
If your customer was on a more recent Plesk server (8.2 is extremely old), this would be fairly simple - remove www.customer1-newbrandname.tld as an alias and add it as a additional domain redirecting to the desired URL or even having a hosting in httpdocs/newsite –  Sergey L Jun 25 '12 at 11:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.