Welcome! Log In Create A New Profile

Advanced

Matching multiple endpoints in location of nginx.conf

November 23, 2014 03:51PM
I can't really test this easily so I am asking instead. I have this location statement in my nginx.conf:

location ~* ^/(api/abcd)/ {
...
}

Now I want to match against "api/efgh". Then the regex should be something like this?

location ~* ^/(api/(abcd|efgh))/ {
...
}

OR

location ~* ^/api/(abcd|efgh)/ {
...
}

OR

something else?
Subject Author Posted

Matching multiple endpoints in location of nginx.conf

keeyong November 23, 2014 03:51PM

Re: Matching multiple endpoints in location of nginx.conf

Igor Sysoev November 24, 2014 01:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready