WordPress and mTLS

Sounds like Wordpress doesn’t know how to use X-Forwarded-Host.

You might need to override some env under php_fastcgi to override SERVER_NAME and/or HTTP_HOST I think (which are the ones which have the request’s Host header in them)

Or maybe you can add something like this in your wp-config.php, idk:

if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
    $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
}
1 Like