Feature suggestion: Manage "sub-sites" in form of directories and Apache "Alias"

5 posts / 0 new
Last post
#1 Sun, 10/24/2010 - 14:00
Locutus

Feature suggestion: Manage "sub-sites" in form of directories and Apache "Alias"

Hey there!

I don't know if this has already been suggested, or is already present and I'm just too stupid to find it. :) Anyway:

Since I currently do my website management the "manual" way on Windows servers, I usually have two ways of implementing adjacent "sub-sites". Either by using an actual DNS subdomain, like "sub.example.com" of "example.com" (which would be the Sub-server feature in Virtualmin) or by Apache-Aliassing "example.com/subsite" to a different directory.

Of course, instead of using an Apache-Alias, I could simply have an actual subdirectory in the main site's "public_html". But, to keep things clean and separate, I always have separate directories for sites and their subs. E.g., talking in Linux terms, "~/public_html" for the main, and let's say "~/sites/subsitename". And that subsite directory gets Aliased.

In Webmin this can of course be accomplished by manually creating ~/sites/... and using the Apache module to add an Alias directive to the main site config (or using the Virtualmin Server Configuration / Website Redirects, once the bug there is fixed :) ).

But maybe, well, it might be an idea to introduce a more "managed" style of creating this kind of sub-website. If you thing this might be worth pondering, feel free to do so! :)

Sun, 10/24/2010 - 14:09
andreychek

Howdy!

Hmm, something's not clicking for me. But hopefully you can set me straight :-)

Is there a difference between what you're suggesting, and what you'd get in Virtualmin by creating a Sub Server?

For example, if you create a Sub Server of "sub.example.com", that would setup a dir in ~/domains/sub.example.com where you can put all the files for that site, offering the separation you had mentioned.

Would that do what you're after?

-Eric

Sun, 10/24/2010 - 16:31
Locutus

Well yeah, as I tried to explain, sub-servers offer half of what I'm after. :) They offer "http://sub.example.com". In addition, I'd like a "managed" way to have "http://example.com/sub". Put in a directory outside "public_html", using Apache Alias.

I hope my babbling was understandable now? :)

Sun, 10/24/2010 - 17:16
andreychek

Howdy,

Ah, what would you think of turning that into a two-step process --

Step 1: Create a sub.example.com Sub-Server

Step 2: For your example.com Primary Virtual Server, go into Server Configuration -> Website Redirects, and setup a redirect for /sub to point to sub.example.com.

Would that do what you're after?

-Eric

Sun, 10/24/2010 - 17:33
Locutus

Mmh... Yes, it would do that, but not exactly as I'm imagining it. Since it would actually redirect the browser to the new URL -- but when I decide to use "/sub" instead of "sub.", I guess I'll be doing that for a reason...

Yeah I know, it's mostly cosmetic if I have a subdomain or a URL-subpath. It's just that sometimes I prefer to have the one or the other, depending on, well, I suppose on "level of standalone-ness" of the subsite. Maybe comparable to how you have the "mydomain.com/awstats" and "mydomain.com/stats" subdirectories in each domain, as opposed to "stats.mydomain.com".

And yeah, I also know that, as I outlined, I can easily achieve the sub-path thing manually, by creating the directory and adding an Alias to the existing domain, since the sub-path does not need its own email or databases or anything. Then again, quite some things that VMin offers a "managed way" for can be easily accomplished manually -- it just "looks better" when they have a kind of management page. :)

No biggie, no "I need that function" or anything. Maybe just a thing worth adding to a future to-do list when you run out of things to improve. :)

Topic locked