I’m trying to use a rewrite in nginx-openresty following a simple example:
location /test
{
rewrite_by_lua_block { ngx.req.set_uri("/authgp") }
}
location /authgp {
proxy_pass http://authwf.org:9001/realms/gp/protocol/openid-connect/token;
}
When I invoke /test, nginx try to find a file named: [error] 35890#5234410: *1 open() “/opt/ho…/auth instead of forwarding to location /authgp as the example says.
How can I tell nginx-openresty not to try to resolve a file but a location?
Thanks!
Fernando