• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

pointing subdomains at a parent site folder

P

porkchop

Guest
Hi all!
I don't know the best way to accomplish this, domain aliases seems sane, as does the idea of a subdomain...here's the situation
We have a family website, let's call it smith.com. Various family members (as of now) have their own folders
fred
jim
annie
sarah
So, www.smith.com/fred (etc) does it for now

I would like to give each of them their own subdomain URL
fred.smith.com
jim.smith.com

To save on disc space, I'd like to point the document root of each family member to their own folder. In a non-Plesk environment this would be fairly trivial, by using the DocumentRoot directive in a vhost.conf file.

The problem is that there doesn't seem to be any capability in the Plesk interface to describe the document root for a subdomain. It gets its own structure and folder like it or not.

So - options then:
1. Symlinks?
Given that the login (ftp) user on the parent site - and subdomains - are always the same, could I simply symlink up the tree to /parent_site/httpdocs/fred from the subdomain folder /subdomains/fred/httpdocs?

2. Domain Alias?
Is a domain alias better? If so, how to point at the right folder for the alias. As I write this, that doesn't seem to be the right approach somehow.

3. vhost.conf
Would a vhost file in the parent site structure be the most elegant approach?
Something like
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName fred.smith.com
DocumentRoot httpdocs/fred
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName joe.smith.com
DocumentRoot httpdocs/joe
</VirtualHost>

OR
should one of those go in each subdomain "member" directory and then run websvrmng -xxx domain.tld (or whatever it is) to rebuild domain config files
I would appreciate some guidance, advice and suggestions on this one. The matter isn't too well documented, if at all (or maybe it is, and I just haven't looked in the right place)

Regards & TIA AND thanks for your patience in reading this far!
porky
 
you can accomplish what you want by simply adding the vhosts to your httpd.conf since in 8.1 plesk writes to Includes/zz010_psa_httpd.conf your entries will not get overwritten. Juts add them to httpd.conf, create the dns entries and apachectl graceful.
 
Originally posted by DCoats
you can accomplish what you want by simply adding the vhosts to your httpd.conf since in 8.1 plesk writes to Includes/zz010_psa_httpd.conf your entries will not get overwritten. Just add them to httpd.conf, create the dns entries and apachectl graceful.

hey thanks for the response!

The creation of subdomains already wrote (and overwrote as I subsequently discovered)to the parent site httpd.include. It was the overwriting issue (as well as wondering about the most elegant solution) which made me assemble that mammoth post above! :D

Unless you mean the server-wide httpd.conf?

-porky
 
you could create the subdomains and simply have mod_rewrites to rewrite the url's to use the subdomains too. this can be easly updated and would not get over written by Plesk if put in .htaccess files
 
Back
Top