November 02, 2013 10:21AM
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 from upstream gave me-
[ec2-user@clarity-test conf]$ curl -i -H ec2-54-208-198-229.compute-1.amazonaws.com:example.com http:/
/23.23.234.234:8080/test
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
Location: https://marketplace-staging.cloud.tibco.com/marketplace/marketplace/login
Content-Length: 0
Date: Sat, 02 Nov 2013 14:13:05 GMT

[ec2-user@clarity-test conf]$ curl -i -d key=value https://example.com/23.23.234.234
HTTP/1.1 302 Moved Temporarily
Content-Type: text/html
Date: Sat, 02 Nov 2013 14:11:53 GMT
Location: https://clarity-test.cloud.tibco.com:8080/clarity
Server: nginx/1.4.2
Content-Length: 160
Connection: keep-alive

<html>
<head><title>302 Found</title></head>
<body bgcolor="white">
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.4.2</center>
</body>
</html>


If I remove the rewrite command and provides the html page in proxy_pass i.e. proxy_pass http://$ec2instance:8080/test/test.html, it gets to the test.html page of the application but does not load any .css .js files and says open failed "/opt/nginx/html/test/test.html.


Regards,
Neha
Subject Author Posted

proxy_pass not passing to dynamic $host

nehay2j October 31, 2013 07:55PM

Re: proxy_pass not passing to dynamic $host

Francis Daly October 31, 2013 08:40PM

Re: proxy_pass not passing to dynamic $host

nehay2j October 31, 2013 09:39PM

Re: proxy_pass not passing to dynamic $host

Francis Daly November 01, 2013 01:54AM

Re: proxy_pass not passing to dynamic $host

nehay2j November 01, 2013 12:29PM

Re: proxy_pass not passing to dynamic $host

Francis Daly November 01, 2013 01:58PM

Re: proxy_pass not passing to dynamic $host

nehay2j November 01, 2013 05:16PM

Re: proxy_pass not passing to dynamic $host

nehay2j November 01, 2013 09:45PM

Re: proxy_pass not passing to dynamic $host

Francis Daly November 02, 2013 05:20AM

Re: proxy_pass not passing to dynamic $host

nehay2j November 02, 2013 10:21AM

Re: proxy_pass not passing to dynamic $host

Francis Daly November 02, 2013 12:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 263
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready