I'm currently trying to fiddle around with a location block that has a different root. However I have some issues when accessing files that are in a subfolder on the different root.
Here is my broken location block and below it I will explain the exact issue:
location /maps
{
alias /online/www/maps.domain.com;
try_files $uri $uri/ @nested;
}
location @nested {
rewrite /maps/(.*)$ ~/maps/$2;
}
Here I try that /maps on my root domain (domain.com/maps) has a different root. That works for files directly on /online/www/maps.domain.com
However if I have a subfolder there e.g. /online/www/maps.domain.com/folder1 I can't speak to it via domain.com/maps/folder1 and so can't access files there.
Is there any "dynamic" way to achieve this? Or do I need to add another location block for that sub-sub-folder?
Thanks.
~ Alex