if ($request_uri ~* "/(v\d+)/.*" ) { set $version $1; } root /home/code/php/potato/$version/food/public;