On 18 September 2012 12:19, Aleksandar Lazic <[email protected]> wrote:
> I have investigate a little bit more and found a better solution.
>
> For me 'better' means no change in WP-Code.

Agreed 110% - I facepalm'd a bit when I saw you modifying core WP code ;-)

> 1.) in haproxy in the https frontend
>
>     ###
>     reqadd HTTPS:\ ON
>     ###
>
> 2.) in nginx conf
>
> http {
> ...
>   server {
>   ...
>         set $myhttps "";
>         if ( $http_https = ON) {
>           set $myhttps on;
>         }
>   ...
>     location ~ \.php {
>     ...
>       fastcgi_param HTTPS $myhttps;
>     ...
>   ...
>   }
> ...
> }

Instead of that, how about

********************************
haproxy.conf:
  reqadd HTTPS:\ on

nginx.conf
  location ~ \.php {
    fastcgi_param HTTPS $http_https;
  }
********************************

That's just a simplification of your config. I'm pretty sure there
would be more that could be removed if I knew WP better ;-)

Jonathan
-- 
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

Reply via email to