March 01, 2010 03:54PM
Merci Guillaume, parfait!

Works like a charm. Was worried for just a second ;) Trust the NGIN,
always trust the NGIN.

Andy


Guillaume Filion wrote:
> Hi Andy,
>
> It looks like a problem I have with my reverse proxy setup.
> I was able to correct it by setting the Host HTTP header to the proxy
> request with "proxy_set_header Host $http_host;" just before proxy_pass.
>
> Hope this helps!
> GFK's
>
> Andy Madsen a écrit :
>> Hi Everyone:
>>
>> I have a two webservers running nginx behind a load balancer. These
>> two webservers are proxying SSL content from an app server on the LAN
>> address that is not on the load balancer. Configuration is below:
>>
>> ==================================================
>> server {
>> listen 443;
>> server_name some.domain.com;
>>
>> ssl on;
>> ssl_certificate /path/to/some_cert.pem;
>> ssl_certificate_key /path/to/some_key.pem;
>>
>> access_log /var/log/httpd/nginx_ssl_access_log main;
>> #access_log off;
>> error_log /var/log/httpd/nginx_ssl_error_log;
>>
>> charset utf-8;
>>
>> location / {
>>
>> if (-f $request_filename) {
>> expires max;
>> break;
>> }
>>
>> if ($request_filename !~ "\.(js|htc|ico|gif|jpg|png|css)$") {
>> proxy_pass https://192.168.2.1;
>> }
>> }
>>
>> }
>> =================================================
>>
>>
>> This works very well for all GET requests, but if I try to post from
>> a non-ssl machine to the load balancer, the proxy tries to serve a
>> file using the LAN address, and obviously fails at
>> https://192.168.2.1. Is there something I'm missing in the reverse
>> proxy for a POST request in my configuration? I haven't been able to
>> find any specific documentation about why a POST wouldn't work, and
>> GET would.
>>
>> NGINX is great!
>>
>> Thanks
>> Andy
>>
>>
>>
>> _______________________________________________
>> nginx mailing list
>> nginx@nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

POST Requests and Proxy Behavior

Goldcap February 24, 2010 11:44PM

Re: POST Requests and Proxy Behavior

Guillaume Filion February 25, 2010 10:06PM

Re: POST Requests and Proxy Behavior

Goldcap March 01, 2010 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 146
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