Given this folder structure:
root folder + default + settings1.txt + settings2.txt ... + settingsN.txt + user00001
location ~ ^(/[^/]+)(/.+)$ { root ...; if (!-d "$document_root$1") { return 404; } try_files $1$2 /default$2 =404; }