0

can some one please help me with location regex. I have such url: https://host.com:444/aaaa-bbb-63810-host1.my-network.com And I need to extract values: 63810 and 1 (part of host1)

what I'm trying is:

    location ~* ^/aaaa-bbb-(?<port>\d+)-host(?<host_id>\d+)/ {
        proxy_pass              http://machine$host_id.my-stg.com:$port;
    }

But this is not going to work. What I've missed?

Roman Iuvshin
  • 1,662
  • 10
  • 22
  • 39

0 Answers0