开发者

Have location block with multi or condition on seperate line nginx

We want to send 30 specific url to a new service and rest traffic will go to old service. So i created a location block with those 30 url

 location ~* ^(/a|/b|/c|/d)$ {}

But the issue is its too hard to add url on same line. I tried writing on different line but it gives error

location ~* ^(/a|
/b)$ {开发者_运维问答

Error

nginx: [emerg] invalid number of arguments in "location" directive in /usr/nginx/conf/nginx.conf:43

Is there some way to write multi url path in same location block but on different lines.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜