File: /home/lindsa/public_html/reverse-proxy.inc.php
<?php // $Id$
//
// Little hack to make wordpress beleive that the connection is SSL
// when connecting non SSL from nginx reverse proxy.
//
if ( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )
{
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = '443';
define('FORCE_SSL_ADMIN', true);
}
// Not sure about next part... let's see later
//if ( isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
// $_SERVER['HTTP_HOST'] = $_SERVER['HTTP_X_FORWARDED_HOST'];
//}