Closed GoogleCodeExporter closed 9 years ago
It is certainly possible to create a module to do this, although it would not
be a dbd (i.e. an SQL database) module. Something like "mod_vhost_file"
perhaps?
Original comment by Thomas.D...@gmail.com
on 11 Feb 2013 at 2:35
Yes exactly. The point being in most systems the database is the
bottleneck. And we do not want another level of querying.
Original comment by ashishpa...@gmail.com
on 11 Feb 2013 at 2:41
The point of the dbd modules is to support SQL database virtual hosts & logging.
There can be many other, non-database, ways to do these functions; but I think
that functionality would belong in some other modules, not in dbd modules
because it would not use Apache's DBD database functionality.
In short, something like mod_vhost_file would not be a valid enhancement to
this DBD module. It would be a completely different Apache module, unrelated
to Apache's DBD database facilities.
Note that virtual hosts can already be done using mod_rewrite.
See: http://httpd.apache.org/docs/2.2/vhosts/mass.html#simple.rewrite
A rewritemap could be used for this instead of the fixed rules shown in the
simple example.
Original comment by Thomas.D...@gmail.com
on 12 Feb 2013 at 12:10
Hi Thomas,
Thanks for all the replies so far. I did not mean this to be feature in the dbd
module. I had no other place to add it. It would definitely have to be a
separate module.
I have looked at various ways for mass hosting,for eg. mod_vhost_alias as well
as mod_rewrite, but none of them can be as clean as a module that could read
and set document root's from an external source at runtime. mod_vhost_alias
does it to a certain degree, but it has an issue where you can efficiently
point very varied domain names (foo.bar.com and foobar.com) to the same
docroot. You could do symlinks, but for a large number of domains, there would
be just too many folders in a single directory.
While searching through google, was wondering if developers could think of
using mysql to do it, why haven't they done it with flat files or even xml's so
that more info could be set into it. Maybe even all the virtualhost directives
for each domain could be set on the fly :P
I have already used a rewrite map to do it. But its just too much code not very
efficient when you have to juggle around with the document root.
Thanks again for the feedback. Maybe someday we will have a better module :)
-Ashish
Original comment by ashishpa...@gmail.com
on 12 Feb 2013 at 12:24
Original comment by Thomas.D...@gmail.com
on 12 Feb 2013 at 6:36
Original issue reported on code.google.com by
ashishpa...@gmail.com
on 11 Feb 2013 at 12:17