I know there is a suggested solution in How to use try_files with 2 or more roots but it does not quite fit what I try to achieve.
We are in the process of migrating a big old webserver with 100,000s of pages to a new webserver. During this process we update the content. The directory for the new content was created from scratch. While we are updating the content we want to make sure that if something is missing in the new folder it can be retrieved from the old one.
My simplified folder structure looks like this:
/mnt/oldcontent
/var/opt/data/company/newcontent
For our scenario the ideal solution would be if we could do something like this:
location / {
try_files /var/opt/data/company/newcontent/$uri /mnt/oldcontent/$uri ...;
}
I know this is invalid syntax.
serverlevelrootthat I override with a newly definedlocationlevelrootwhich I specify intry_fileswith something llike@oldcontentroot