virtual server in sub folders

7 posts / 0 new
Last post
#1 Mon, 06/27/2011 - 01:51
omrib

virtual server in sub folders

Hi, I have a server and I would like to create sub servers in folders. its a school website, so I would like to give each student project a sub folder which they can manage, but still under the school domain.

for example, site.com/projectA

is there an easy way I can do that with virtualmin?

Mon, 06/27/2011 - 03:39
Locutus

Yep, a very easy way. :) When creating a server, use "sub-server" of an existing server as type. The new server will then share the administrative user with the parent server (while you can still add users with website access), and its directory will reside under /home/server.tld/domains/sub.server.tld. Those path name components can be configured too.

Mon, 06/27/2011 - 03:49
omrib

but will I be able to access it at http://site.com/projectA ? from what I saw when configuring a sub-server, it lets be add a sub-domain

how do I map it to a folder of my liking?

Mon, 06/27/2011 - 08:16
andreychek

Normally, the way to do that in Virtualmin would not be to access site.com/projectA, but to access projectA.site.com.

If that isn't what you're looking for -- and you only need to give the students FTP access, you could always have just a site.com domain, create a projectA folder, and then give your student an FTP account that's restricted to the projectA folder.

To do that, go into Edit Mail and FTP Users, and create an Website FTP Access User.

Next, you'd need to go into Limits and Validation -> FTP Directory Restrictions, and restrict FTP users to their home directories.

-Eric

Tue, 06/28/2011 - 14:09
Joe
Joe's picture

You guys are all making this too complicated. Just give each student a new virtual server! It can be a subdomain of the school's domain.

Virtualmin is a virtual hosting control panel (i.e., it works with domains)...it is not really targeted to making FTP accounts with UserDir style home directories. You'd probably be better off leaving Virtualmin out of the picture altogether if you're going to go that route. Just set up your domain and UserDir once, and then add your users in Webmin's Users and Groups module. If you don't want domains (where a subdomain is also a domain, as far as Virtualmin is concerned), then you probably don't want Virtualmin.

But, if it were me, I'd give every user their own top-level virtual server, as well as creating a virtual server for the domain of the school (if you don't already have a domain and website for the school on another server).

--

Check out the forum guidelines!

Tue, 06/28/2011 - 15:50
Locutus

What's "complicated" about making them sub-servers, so the administrator of the parent server (probably a teacher) automatically has access to all the student directories? You don't have that when making side-by-side top-level servers, except the teacher does all his stuff as root.

Tue, 09/30/2014 - 23:56
azcunaga

Hi!

I have a similar question as the one above. Personally, I have no preference for having either of these two options:

domain.com/projectA

or

projectA.domain.com

However, I am implementing an SSL server, and since the second option (subdomain) requires a wildcard SSL certificate (more expensive than a regular SSL cert), then the 1st option (subfolder) seems like a more reasonable long term solution.

However, I see no way of easily doing this in virtualmin (it automatically fills in the sub-server's name as a subdomain).

I thought I had no problem with just creating the folders inside public_html and managing them manually, however, configuring apache virtual hosts, htaccess files, etc. for each of these "servers" has proven a pretty time-consuming endeavor.

I wish I could use the out-of-the-box settings I get with the parent domain setup in Virtualmin which is pretty painless, just with on sub-folder option.

I appreciate any tips or suggestions.

Topic locked