我正在尝试让这 2 个位置指令在 Nginx 中工作,但是在启动 Nginx 时出现了一些错误。
location ~ ^/smx/(test|production) {
proxy_pass http://localhost:8181/cxf;
}
location ~ ^/es/(test|production) {
proxy_pass http://localhost:9200/;
}
Run Code Online (Sandbox Code Playgroud)
这是我收到的错误:
nginx: [emerg] "proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block
Run Code Online (Sandbox Code Playgroud)
有没有人觉得很熟悉?我在这里错过了什么?