httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Thuning <thun...@dsv.su.se>
Subject [users@httpd] Allow relative paths in Directory directives?
Date Fri, 11 Sep 2020 09:29:51 GMT
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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message