optimize nginx location matching