abusesa::serivices: Add support for filesystem paths

This commit is contained in:
Ossi Salmi 2016-01-20 15:30:52 +02:00
parent d82e3021a4
commit 85eec8d22b
2 changed files with 11 additions and 0 deletions

View file

@ -20,6 +20,16 @@ server {
return 403;
}
<% end -%>
<% @paths.each do |path|
filep, sep, urlp = path.partition(':')
continue if filep.empty? or urlp.empty?
-%>
location <%= urlp %> {
alias <%= filep %>;
autoindex on;
}
<% end -%>
<% @services.each do |service|
dir, sep, sock = service.rpartition('/')