This regex sets different parts of the url host in variables :
In the host name we want to be able to determine the following:
www namespace with code 301feature-, redirects to the proper 'feature' upstream built server feature-*.app:8080api as last element, it is redirected to the API node server (eventually the one of a dedicated feature) [feature-*|default].api:8081default.app:8080.If no upstream server is found, the nginx proxy will return an error 502 maintenance