[BlueOnyx:22335] Re: Use of a sub sub directory for a Sub Domain

Michael Stauber mstauber at blueonyx.it
Wed Aug 15 16:05:17 -05 2018


Hi Tobias,

> I really need the possibility to change the Document Root of a Sub Domain to a second level sub directory.
> 
> I just edited the apache subdomain configuration manually (Document Root and ProxyPassMatch because of PHP-FPM) and everything worked as expected. The only problem: this is ephemeral. The next gui change will change it back. And I hate setting files immutable..
> 
> Can I expect a fix on this?

I might look into it. However: I don't like it one bit as it requires me
to throw code at issues that I don't think are issues, but users
conducting lazy or bad practices that they can easily work around by
designing their content right. Throwing more code at problems that
aren't problem is rewarding such conduct, which is isn't the best of ideas.

You need a subdomain? Great. Create one via the GUI and have it pointed
to a directory inside /web. Why should it be a second or third level
below /web and why can't you just place the content from there one level
further up? That's less work for you than it's for me to fiddle with the
GUI code. I would have to directory traverse the whole /web directory
tree to the lowest level, parse that and stuff it into a pulldown. With
some WebApps installed into /web you suddenly end up with a pulldown
that has +200 options and the pulldown's width is wider than your
screen. That would look pretty stupid.

Likewise: People wishing for functionality for subdomains that are
reserved to Vsites? Why not have one Vsite called www.domain.com and
then create another Vsite named subdomain.domain.com and let it have
it's own webspace? You could still point the DocumentRoot wherever else
you like in the siteX.include file. You could create a "reseller"
account and have it own both, so the end-user still has control over
both. "But ... but ... but ... then he can't use the same FTP-account to
upload to both!" Sure. Why not use a CMS or a web based uploader such as
the one that's now integrated into the GUI? There, that's the solution
to that problem and it doesn't require changes to the GUI.

We HAVE to live with ONE limitation in regards to PHP: Web based content
must be owned by a certain user (preferably a siteAdmin). THAT ownership
defines the UID/GID with which Apache will execute the script(s) and
with which it creates files and folders.

Any feature we throw on top of that (Vsites, subdomains, file access via
FTP) has to work with that given constriction. We can't replace FTP with
WebDAV, because that only works if files and folders are owned by the
Apache-user and not a siteAdmin. So for uploads it's either FTP or a web
based uploader like the one built into the GUI via Net2FTP or available
in certain WebApps.

But yes: You can of course post a feature request and I might eventually
look at that and implement it or certain aspects of it. But with things
like *this* you have to work hard to convince me why I should do it,
because I don't see the need and (if I needed to host something like
that) would design the webpage in a better way to begin with.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list