Francis Daly
November 01, 2013 01:58PM
On Fri, Nov 01, 2013 at 12:29:24PM -0400, nehay2j wrote:

Hi there,

> 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;

> If I uncomment 'proxy_set_header Host' and 'proxy_set_header
> X-Forwarded-For' it ends into 404 error.

I presume that the 404 comes from your upstream server. Use
proxy_set_header to set whatever header values that upstream needs,
to handle the request.

I suspect that "proxy_set_header Host $1;" is what you want -- or to
have no proxy_set_header directives at all so that the default applies.

> Otherwise it rewrites and proxies
> fine but doesnt pass the POST parameter.

It all works fine for me.

Can you provide evidence of where it fails to do what you expect?

Perhaps tcpdump the traffic, and see what does nginx send to upstream? If
it is the expected correct client request, then you should check what
the upstream does with a similar request that you make using, say, curl.

Provide a specific example of what exactly you do, ideally using "curl",
and what response you get, and what response you expect. That's the best
way of making it easier for someone else to help.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 116
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready