Created
August 31, 2012 07:10
-
-
Save brgmn/3549801 to your computer and use it in GitHub Desktop.
Use Oxid eShop with nginx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (@$_SERVER['SERVER_NAME'] == 'katzentest-ssl.local'){ | |
$this->_blIsSsl = true; | |
} | |
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { | |
$list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']); | |
$_SERVER['REMOTE_ADDR'] = $list[0]; | |
$_SERVER['HTTP_HOST'] = 'katzentest.com'; | |
$_SERVER['SERVER_NAME'] = 'katzentest.com'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And in the nginx location you will have to specify the HTTP_X_FORWARDED_FOR header:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;