fix variable scope resolution issue in location.conf.erb