Hi Francis, I added rewrite command so that the url doesn't show IP passed to the nginx. Curl gives a 302 because it doesnt have the sessionid with it. If there is a session id that is passed to the application running on http://23.23.234.234:8080/test, it will take us to app. I can see in application logs that jsessionid does not get there and hence it redirects to the login page. Curl froby nehay2j - Nginx Mailing List - English
Hi, I did a curl on the url - curl -i https://example.com/23.23.234.234 HTTP/1.1 302 Found Date: Sat, 02 Nov 2013 01:37:47 GMT Location: https://marketplace.example.com/marketplace/marketplace/login Server: nginx/1.4.2 Content-Length: 0 Connection: keep-alive Which is correct. But when I submit post request through browser, I gives me a 404 with no error in logs. Should i be using reby nehay2j - Nginx Mailing List - English
Thanks Francis. I could finally see the post parameters at server end. Setting proxy_set_header Host $1; changes the browser url which we donot want. Currently, the code looks like- location ~ /(?<ec2instance>[0-9].*) { rewrite $(.*)$ https://$http_host/test last; proxy_pass http://$ec2instance:8080/test; proxy_set_header Host $by nehay2j - Nginx Mailing List - English
Thanks Francis. I was able to get past this issue. Appreciate all the help. Now I am stuck at forwarding the POST parameters to this proxy server. proxy_pass http://$1:8080/clarity; proxy_set_header X-Forwarded-Proto $scheme; proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; #proxy_set_header Host $host; proxy_set_header X-Real-IP $remoby nehay2j - Nginx Mailing List - English
Thanks Francis. I am making a GET call through browser like- https://example.com/ec2..com Error Logs- 2013/11/01 01:33:49 13086#0: *1 no host in upstream "/ec2-xx-xxx-xxx-xxx..amazonaws.com:8080/test", client: 10.10.4.167, server: clarity-test.cloud.tibco.com, request: "GET /ec2-xx-xx-xxx-xx..amazonaws.com HTT P/1.1", host: "example.com" Regards, Nehby nehay2j - Nginx Mailing List - English
Hi, I need to do proxy_pass to host name passed in url and rewrite url as well. Since the host name is difference with each request, I cannot provide an upstream for it. Below is the nginx configuration I am using but it doesnt do proxy pass and returns 404 error. The hostname resembles ec2...com. location ~* ^(/ec2..*)$ { # try_files $uri $uri/index.html; # rewrite ^(/ec2..*)$ https://exaby nehay2j - Nginx Mailing List - English
Hi, I need to do proxy_pass to host name passed in url and rewrite url as well. Since the host name is difference with each request, I cannot provide an upstream for it. Below is the nginx configuration I am using but it doesnt do proxy pass and returns 404 error. The hostname resembles ec2...com. location ~* ^(/ec2..*)$ { # try_files $uri $uri/index.html; # rewrite ^(/ec2.by nehay2j - How to...