• 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

Resolved domain with storage in sub-folder of another domain

jonny512379

New Pleskian
Server operating system version
Ubuntu 22.04.3 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.56 Update #4,
Hello All

I would like to have storage as detailed below for some of my domains:

example1.com IN /var/www/vhosts/example1.com/httpdocs/
example2.com IN /var/www/vhosts/example1.com/httpdocs/example2/

On other servers (possibly more basic than plesk) i have used, this was done in "Apache Directives", where i could set Alias, log file locations, and of course the storage location.
I am no server expert as you can tell.

Mt reason for wanting the domain structure as above (i know .htaccess will inherit, but i am fine with this):
I have 1 large site, with 100s of backend code files, that need to be identical for all sites. I do not want to have to host identical files for each domain name
FYI: the files i want all sites to be able to access are mainly in /var/www/vhosts/example1.com/httpdocs/class/

Is this possible please?
Or would there be a better way of me doing this, yet using the same backend files for all domains?

Thanks
Jon
 
Plesk does this automatically if you create a new domain that shares it's webspace with an existing domain. (Or if you are using the Service Provider View, a 'webspace' is similar to a subscription. In which case you would add a new domain to an existing subscription).
 
Last edited:
Plesk does this automatically if you create a new domain that shares it webspace with an existing domain. (Or if you are using the Service Provider View, a 'webspace' is similar to a subscription. In which case you would add a new domain to an existing subscription).
hehe. well thank you... i never thought to try and see if it will automatically do it... i was looking into A website hosted in Plesk is not accessible: open_basedir restriction in effect - Support Cases from Plesk Knowledge Base and many other ideas.
I will give it a go! thank you!!!
 
Plesk does this automatically if you create a new domain that shares it webspace with an existing domain. (Or if you are using the Service Provider View, a 'webspace' is similar to a subscription. In which case you would add a new domain to an existing subscription).
So simple, yet i have tried various methods over the day, resulting in "not accessible", "not in path" or "permissions errors".
I never though to try the obvious, assuming Plesk would not have had much need to for this in the past.
It works perfect, with slight alteration to the include/required file path!
(i am going to need to upgrade my licence as i now need more domains, now that i know i can get this to work, without duplicating code files for each domain!)

Thank you!
 
Back
Top