Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WordPress on CentOS 7 Linux

Hi,

On Sun, Jun 26, 2016 at 8:06 PM, Alexander Farber
<alexander.farber@xxxxxxxxx> wrote:
> My only problem is that with Apache I had the following wp-config.php
>
> if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
>         $_SERVER['HTTPS'] = 'on';  // works with Apache, but not Jetty
>
> if (preg_match('/^\d+\.\d+\.\d+\.\d+$/', $_SERVER['HTTP_X_FORWARDED_FOR']))
>         $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_FORWARDED_FOR'];

This special code I presume you added in wp-config.php is not needed with Jetty.
Jetty already does this logic in FastCGIProxyServlet, namely:

* if the client request came in with an "https" scheme, then "HTTPS=on"
* client request's remote address and port are set to "REMOTE_ADDR"
and "REMOTE_PORT" respectively.

> And in my /etc/haproxy/haproxy.cfg I set these 2 variables:

You don't need them.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top