Hi Erik,
Couldn't you do something like this?
<Directory "/www/*/public_html">
That should work just fine, if you have your vhosts in a common structure. Alternatively, you could look at DirectoryMatch and come up with something awful that matches your structure.
Cheers,Gillis
On Fri, Sep 11, 2020 at 11:30 AM Erik Thuning <thuning@xxxxxxxxx> wrote:
Hi!
This is something that I keep thinking about when I configure my various
vhosts, and would like feedback on, along with a pointer to where I
could request the change if it is actually sane.
Currently, <Directory> directives require an absolute path. I would like
to be able to use paths relative to the DocumentRoot by omitting the
initial / in the path supplied in standard UNIX fashion (basically
treating the DocumentRoot as the working directory). If the <Directory>
is specified in a context without a set DocumentRoot, it would be
considered an error.
To me this would solve a long-standing issue with feeling compelled by
my own laziness to use <Location> directives when I want to customize
handling of directories inside the DocumentRoot. This is counter to the
recommendations in the documentation but prepending the DocumentRoot
path everywhere is both cumbersome and error-prone, so I usually go for
the "bad" approach.
Adding support for relative <Directory> directives could also make
certain configurations more portable by only needing to change the
DocumentRoot when cloning a vhost to a new directory, instead of having
to update all instances of <Directory> as well.
I haven't been able to find any explicit rationale for the way the
directive works right now, so I don't know if I'm missing anything
fundamental that would make this unworkable. I would be thankful for any
feedback pointing me to such a rationale if it exists.
Regards
Erik Thuning
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx