• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Subdomain Folders and Redirect

A

adstock

Guest
Scratching my Head on this one.

A Client has 5 Domains, he wants them all in one domain web space, because there are sharing the Same DB and image files, there is one main site.
Domain1.com and 4 child sites domain2,domain3, domain4 and domain5
he wants each of the domains 2, 3, 4 and 5 in there own directory under httpdocs.

Domain2 /httpdocs/domain2
domain3 /httpdocs/domain3

So I have created through the Control panel the webspace for Domain1 and added the other four domains as subdomains.
I have created the all the sub-directories under httpdocs.

I now have a http.include file which looks alright, it has the domain, and all the other domains as alias.

So I thought a vhost.conf would sort my problem out and I could create a vhost.conf that looked something like this

<Directory /var/ww/vhsot/domain1/httpdocs/domain2>
ServerAlias www.domain2.com
ServerAlias domain2.com
</Directory>

However after issuing the websrvmng command and restarting apache I get the following error.

Starting httpd: Syntax error on line 2 of /var/www/vhosts/domain1/conf/vhost.conf:
ServerAlias not allowed here

So if I cannot use the Serveralias command in vhost.conf and we are not meant to edit the http.include file, then I am not sure how to do this. any help gratefully accepted
 
Back
Top