> -----Original Message----- > From: Felipe Gasper <felipe@xxxxxxxxxxxxxxxx> > Sent: Monday, 10 January 2022 14:47 > To: users@xxxxxxxxxxxxxxxx > Subject: High availability vhosting WAS Re: [users@httpd] > Dynamic vhost config? > > > > > On Jan 8, 2022, at 10:01, Eric Covener <covener@xxxxxxxxx> wrote: > > > > On Sat, Jan 8, 2022 at 9:49 AM Felipe Gasper <felipe@xxxxxxxxxxxxxxxx> > wrote: > >> > >> Hi all, > >> > >> Are there any existing httpd modules that allow for fully dynamic vhost > configurations via LDAP or some other query mechanism? > >> > >> Kind of like mod_vhost_alias, but instead of looking on disk it would query > a socket? > >> > >> If not, is such a thing possible to write via httpd’s existing plugin > mechanism? > > > > I don't think it's feasible for them to act like real virtualhosts > > e.g. activating arbitrary directives as if they were enclosed in a > > unique VirtualHost. Same limitation as mod_vhost_alias has. > > > > There's no reason why a copy of mod_vhost_alias couldn't look up > > something the way you describe at runtime to make its decision. > > Fortunately It is a very small/simple module. > > > If I’m understanding you correctly, while it’s easy to make such a setup with > just the very basic controls that mod_vhost_alias exposes, it’s much harder > to have it be able to use, e.g., mod_ruid2, mod_userdir, etc.? That’s probably > unfeasible for my use case. > > A bit more context: currently we run httpd in a “classic” single-node setup, > hosting 1,000s of virtual hosts that users individually control. Any time a user > adds/removes/alters a domain, httpd.conf is updated. We’d like to explore > high-availability options, but containerized/k8s setups that I’ve seen seem to > package the configuration in the container, which means updates to that > config would entail rebuilding the container; that would seem to entail a > dramatic increase in “churn” every time a user adds or removes a domain. > > What, if anything, have others done to address this problem? Perhaps you can modularize your config. Put all of the virtual hosts into separate .conf files that are included via e.g.: IncludeOptional conf.d/*.conf Then the conf.d folder could be a mounted from the host in the container. That would avoid the need to rebuild the container and still allow you to quickly reload the configuration. HTH Bram --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx