How do I create a subdomain and point it to an existing folder under /home/public_html?

6 posts / 0 new
Last post
#1 Fri, 08/16/2019 - 02:11
Mike C

How do I create a subdomain and point it to an existing folder under /home/public_html?

This was easy in IIS. It let you select the path for every domain / subdomain, and I'm stumped. I've gone through every option -- top level server, alias, sub-server, sub-domain and I can't find an option under any of them to change the document root.

I'm trying to do something simple: mydomain/home/public_html (created with the domain and obviously works) mydomain/home/public_html/wp_content

Surely someone has done this for wordpress optimization / cookie free domains.

What am I missing?

Fri, 08/16/2019 - 08:51

Is that not just a redirect of to mydomain/home/public_html/wp_content/? If so, then there is a redirect page under virtualmin/server configuration.

Fri, 08/16/2019 - 19:04 (Reply to #2)
Mike C

It could be done that way, but it is sloppy and will increase page load time. I guess you can also do it in .htaccess will ding for stuff like that.

Sat, 08/17/2019 - 14:39

Virtualmin puts the initial domain's public www folder in /home/user/public_html

When creating a sub domain of the above domain, it puts the public folder in /home/user/domains/

Isnt that what you need? Isnt it as simple as creating subdomain of and put all your static files in /home/user/domains/ ? I just did a test and it worked that way.

Sat, 08/17/2019 - 14:53 (Reply to #4)
Mike C

I don't want to put any content there. It needs to point to the existing public_html/wp-content folder

Sun, 08/18/2019 - 02:45

So create it using the defaults, then edit it to suit your needs.

Topic locked