Attached is my patch for "<HostGroup name>" directive. I tested this with the http2 test suite unchanged and with its config rewritten to use the new directive. There are some special quirks in ap_fixup_virtual_hosts() that I tried to preserve in semantics as best as I could. Maybe someone with deeper understanding of log config and dir config sorting can have a look?
For the user it looks as described earlier (I went for Roy's "HostGroup" suggestion because a) it's Roy and b) because the name is easy to understand. "ServerGroup" would have worked also, if we would have "VirtualServer"s, but we have Hosts, so HostGroup make sense) Anyhow, HostGroup gets a name (which must be unique) and uses that as default for ServerName. So: <HostGroup example.org> ServerAlias www.example.org DocumentRoot /path <VirtualHost *:80> ... </VirtualHost> <VirtualHost *:81> ... </VirtualHost> </HostGroup> will work. There are some things which are not auto-inherited on servers, mainly because - I speculate - it was not relevant before. mod_rewrite for example does not inherit by default and seems to also need a "RewriteEngine on" in each vhost. But that can be remedied easily, if we accept this new way of configuring things. I'd like some feedback on the patch before putting it in trunk. So, if you'd find the time - much appreciated. Cheers, -Stefan
hostgroup-v1.0.diff
Description: Binary data