#############################################
# this is nginx_ss.lua
# body preparation as string in json format
local final_json = table.concat(api_table);
--ngx.print(final_json);
ngx.req.read_body();
local res = ngx.location.capture("/v1/secure/proxy_shield_square/", { body = final_json });
ngx.say("\n\n--------Response Headers from Remote server-------------");
ngx.say("status : ", res.status);
ngx.say("method : ", res.method);
ngx.say("body :", res.body);
for k,v in pairs(res.header) do
ngx.say(k,'-', v);
end
##################################################
Command to reload nginx conf
$ nginx -p `pwd` -s reload
nginx: [emerg] invalid host in upstream "http://0.0.0.0:5000/api/v1/ssjs" in /home/lautner/CodeCave/open_nginx/conf/nginx.conf:15
Is there is something wrong i am doing right now?
when i proxy_pass directly this http://0.0.0.0:5000/api/v1/ssjs , i am getting all request at this running server locally.
but when using upstream directive, it throwing this above error. Please someone having this knowledge regarding this issue, help me out? Thanks%