Hi Stefan, On Wed, Sep 20, 2017 at 2:06 PM, Stefan Eissing <stefan.eiss...@greenbytes.de> wrote: > >> Am 20.09.2017 um 12:33 schrieb Yann Ylavic <ylavic....@gmail.com>: >> >> On Wed, Sep 20, 2017 at 12:09 PM, Stefan Eissing >> <stefan.eiss...@greenbytes.de> wrote: >>> >>> Is there some better way? >> >> I would go with the usual/unconditional per server config (and hence >> merging), trade simplicity vs a few memory space... > > Not sure I get your dift here.
I think you lost me too :) Let's try to get in sync... > > server/config.c calls merge_server_configs() for each non-base server_rec > and that one copies the config pointer from base if the vhost has none. > if there is one, it merges. If the module defines its own server_config_create() which allocates one, each vhost will have its own, and the module's server_config_merge() can do whatever needs to for the members of the config (pointer copy, shallow/deep copy, ...). I didn't re-looked at the mod_ssl config code lately, I remember some special treatment for main server config (re process->pool), but it seems to me that each vhost has its own config, and that the merge process issues copies (shallow?). What I don't remember is some modifications of the server configs in place in post_config, if that's the case it should indeed be preceded by a deep copy sowehow... > > Now, are you speaking of changing that for all modules? Add a flag to "struct > module" > or solve it in mod_ssl post_config? Of course not, create/merge process per module can already do that, up to the module to do what it needs (correctly). Regards, Yann.