Skip to content

Instantly share code, notes, and snippets.

@brgmn
Created August 31, 2012 07:10
Show Gist options
  • Save brgmn/3549801 to your computer and use it in GitHub Desktop.
Save brgmn/3549801 to your computer and use it in GitHub Desktop.
Use Oxid eShop with nginx
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';
}
@brgmn
Copy link
Author

brgmn commented Aug 31, 2012

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment