Hello Yichun, The use case I am trying to test is the client sends a request to nginx server with some parameters say "/a/b/c/d": http://NginxHost/a/b/c/d Depending on the parameters a,b,c and d I will get the IP and port of the destination server (by communicating with postgres) where the request must be redirected to ie the new url is of the form: http://IP:port/a/b/c/d. Usiby arunh - Nginx Mailing List - English
Hello Yichun, Thank you very much for the reply. I have used ngx.location.capture for extracting the values from postgres database as suggested by you. I had to make a series of postgres calls so I used content_by_lua along by sharing the varialbes as I had to query tables from multiple databases. I have now got the needed nodeIP and port ultimately. But I am not able to redirect the urlby arunh - Nginx Mailing List - English
Hello All, I am newbie to Nginx and I am using Nginx with PostgreSQL database. When there is a http request to the server I want to extract one of the input variables in the request, query the Database and retrun the result, the variable inside the postgres_query is empty. But when I try to print the value of "$1" variable and also after assigning it to the variable "$tenaby arunh - Nginx Mailing List - English