First define virtual path called virtualfolder. It can be any name actually. Then define subfilter what replaces slash with virtualfolder name.
location /virtualfolder/ {
sub_filter "/" "/virtualfolder/";
}
Any url in location will become /virtualfolder/